Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
External HDD & vfat. [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 12:31 am    Post subject: External HDD & vfat. [SOLVED] Reply with quote

I just bought an external hard drive. Its a 250GB maxtor in a enclosure I bought from newegg.

Anyways when I mount it I can't write to it. I can only read from it. I have tried following these guides over at the gentoo-wiki. Even as root I can do nothing. I would just use reiserfs but I have to use vfat as it is compatible with windows.

HOWTO Mount Windows partitions (DOS, FAT,NTFS)
HOWTO USB Mass Storage Device
HARDWARE Using an iPod With Gentoo Linux

here is my fstab

Code:
/dev/hda1               /               ext3            noatime         1 2
/dev/hda2               /ftp/music_l-z  reiserfs        noatime         1 2
/dev/hdb1               /ftp/music_a-k  reiserfs        noatime         1 2
/dev/sda1               /ftp/1upload    reiserfs        noatime         1 2
/dev/sdb1               /ftp/media      reiserfs        noatime         1 2
/dev/sdc1               /ftp/media2     reiserfs        noatime         1 2
/dev/sdd1               /ftp/software   reiserfs        noatime         1 2
/dev/sde1               /ftp/2backup    vfat            gid=0,umask=0000       0 0
/dev/sde2               /ftp/xfer       vfat            gid=0,umask=0000       0 0


The external device is sde. I have tried a number of different combonation on the options. defaults, gid, uid, umask, etc...

When I try chown it syas I can't perform the operation on this device. I am always root when I try this whole process.

Any ideas? I'm no moron please don't say unhelpful things like "If you can't figure out basic permissions don't use linux." Because I can most of the time just not on this external drive.


Last edited by RajjPajj on Tue Feb 28, 2006 8:33 am; edited 1 time in total
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1477
Location: /uk/sheffield

PostPosted: Tue Feb 28, 2006 2:19 am    Post subject: Reply with quote

Code:

/dev/hda1               /               ext3            noatime         1 2
/dev/hda2               /ftp/music_l-z  reiserfs        noatime         1 2
/dev/hdb1               /ftp/music_a-k  reiserfs        noatime         1 2
/dev/sda1               /ftp/1upload    reiserfs        noatime         1 2
/dev/sdb1               /ftp/media      reiserfs        noatime         1 2
/dev/sdc1               /ftp/media2     reiserfs        noatime         1 2
/dev/sdd1               /ftp/software   reiserfs        noatime         1 2
/dev/sde1               /ftp/2backup    vfat            user,gid=0,umask=0000       0 0
/dev/sde2               /ftp/xfer       vfat            user,gid=0,umask=0000       0 0


Try adding user or users option to your fstab for the /dev/sde* devices you want to be able to mount as non-root as I have done in your example above.

From man mount....

Code:

user   Allow an ordinary user to mount the file system.  The name  of  the
          mounting  user  is  written to mtab so that he can unmount the file
          system again.  This option implies the options noexec, nosuid,  and
          nodev  (unless  overridden  by subsequent options, as in the option
          line user,exec,dev,suid).

users  Allow every user to mount and unmount the file system.  This option
           implies the options noexec, nosuid, and nodev (unless overridden by
           subsequent options, as in the option line users,exec,dev,suid).


See man fstab and man mount for more details.

HTH's

slack
Back to top
View user's profile Send private message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 3:33 am    Post subject: Reply with quote

Didn't work. :(
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1477
Location: /uk/sheffield

PostPosted: Tue Feb 28, 2006 3:51 am    Post subject: Reply with quote

Ahh, perhaps you need to add the "rw" option to each of the lines so you can actually Read and Write to the drive (hence the recomendation to see the fstab and mount man pages I gave).

Here is my /etc/fstab which mounts various drives of different formats..

Code:

$ more /etc/fstab
/dev/hda1               /boot           ext2            defaults,noatime               1 2
/dev/hda2               none            swap            sw                             0 0
/dev/hda3               /               ext3            defaults,noatime               0 1
/dev/hda4               /data           ext3            noatime,users,rw               0 0
/dev/sr0                /mnt/cdrom      iso9660         noauto,users,ro                0 0
none                    /proc           proc            defaults                       0 0
none                    /dev/shm        tmpfs           nodev,nosuid,noexec            0 0
/dev/sda1               /mnt/camera     auto            noauto,noatime,user,rw         0 0
/dev/sda3               /mnt/fisher     ext3            noauto,noatime,user,rw         0 0
/dev/sda6               /mnt/articles   ext3            noauto,noatime,user,rw         0 0
/dev/sda7               /home/neil/usb  ext3            noauto,noatime,user,rw         0 0


HTH's

Neil
Back to top
View user's profile Send private message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 5:57 am    Post subject: Reply with quote

Nope. :(

"Cannot chown target file '/ftp/2backup/test.zip' Operation not permitted (1)"

Thats the error I get in MC.

If I just copy the file in the terminal using the cp command it goes through HOWEVER it is not accessible. I also cannot chown it.

Thanks for the help so far.
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1477
Location: /uk/sheffield

PostPosted: Tue Feb 28, 2006 6:12 am    Post subject: Reply with quote

Hmm I'm not sure what the problem might be but could you post the commands your using and the output of things like...

Code:

$ cd /ftp/
$ ls -lh
$ groups
$ more /etc/groups
$ more /etc/fstab
$ more /etc/mtab


as that might contain some useful information.

slack

P.S. - Could you use the BB tags to encapsulate things in code it makes it a bit easier to delineate between what your saying and what your trying to type/error messages in the console.
Back to top
View user's profile Send private message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 7:11 am    Post subject: Reply with quote

In the order you asked:

Code:
ls -lh
total 9.5K
drwxr-x---  20 ftpul ftp  1.5K Oct 15 00:08 1upload
drwxr-x---   2 root  root 4.0K Oct 20 16:17 2backup
drwxr-x---  11 ftpul ftp   288 Sep 21 18:58 media
drwxr-x---   9 ftpul ftp   232 Dec 19  2005 media2
drwxr-x---  16 ftpul ftp   368 Jul 21  2005 music_a-k
drwxr-x---  21 ftpul ftp   488 Apr 16  2005 music_l-z
drwxr-x---  13 ftpul ftp   344 Oct  1  2005 software
drwxr-x---   2 root  root 4.0K Oct 20 16:17 xfer


Code:
root bin daemon sys adm disk wheel floppy dialout tape video


more /etc/groups did not work but more /etc/group did.

Code:
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root,adm,haldaemon
lp:x:7:lp
mem:x:8:
kmem:x:9:
wheel:x:10:root,matt
floppy:x:11:root,haldaemon
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:man
cron:x:16:cron
console:x:17:
audio:x:18:
cdrom:x:19:haldaemon
dialout:x:20:root
ftp:x:21:
sshd:x:22:
at:x:25:at
tape:x:26:root
video:x:27:root
squid:x:31:squid
gdm:x:32:gdm
xfs:x:33:xfs
games:x:35:
named:x:40:named
mysql:x:60:
postgres:x:70:
cdrw:x:80:haldaemon
nut:x:84:
usb:x:85:matt,haldaemon
vpopmail:x:89:
users:x:100:games,matt
nofiles:x:200:
qmail:x:201:
postfix:x:207:
postdrop:x:208:
smmsp:x:209:smmsp
slocate:x:245:
portage:x:250:portage,matt
utmp:x:406:
nogroup:x:65533:
nobody:x:65534:
messagebus:x:407:
haldaemon:x:408:haldaemon
rpc:x:111:
plugdev:x:409:
apache:x:81:


Code:
/dev/hda1               /               ext3            noatime         1 2
/dev/hda2               /ftp/music_l-z  reiserfs        noatime         1 2
/dev/hdb1               /ftp/music_a-k  reiserfs        noatime         1 2
/dev/sda1               /ftp/1upload    reiserfs        noatime         1 2
/dev/sdb1               /ftp/media      reiserfs        noatime         1 2
/dev/sdc1               /ftp/media2     reiserfs        noatime         1 2
/dev/sdd1               /ftp/software   reiserfs        noatime         1 2
/dev/sde1               /ftp/2backup    vfat            users,rw        0 0
#/dev/cdroms/cdrom0     /mnt/cdrom      iso9660         noauto,ro       0 0


Code:
/dev/hda1 / ext3 rw,noatime 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
udev /dev tmpfs rw,nosuid 0 0
devpts /dev/pts devpts rw 0 0
/dev/hda2 /ftp/music_l-z reiserfs rw,noatime 0 0
/dev/hdb1 /ftp/music_a-k reiserfs rw,noatime 0 0
/dev/sda1 /ftp/1upload reiserfs rw,noatime 0 0
/dev/sdb1 /ftp/media reiserfs rw,noatime 0 0
/dev/sdc1 /ftp/media2 reiserfs rw,noatime 0 0
/dev/sdd1 /ftp/software reiserfs rw,noatime 0 0
shm /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/sde1 /ftp/2backup vfat rw,noexec,nosuid,nodev 0 0


The last line in this last one looks wrong specificly the noexec (no execute) and nosuid.

Thanks again for your help.
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1477
Location: /uk/sheffield

PostPosted: Tue Feb 28, 2006 7:27 am    Post subject: Reply with quote

Well it looks to me like a permissions problem, if you look at the output from....

Quote:

Code:

ls -lh
total 9.5K
drwxr-x---  20 ftpul ftp  1.5K Oct 15 00:08 1upload
drwxr-x---   2 root  root 4.0K Oct 20 16:17 2backup
drwxr-x---  11 ftpul ftp   288 Sep 21 18:58 media
drwxr-x---   9 ftpul ftp   232 Dec 19  2005 media2
drwxr-x---  16 ftpul ftp   368 Jul 21  2005 music_a-k
drwxr-x---  21 ftpul ftp   488 Apr 16  2005 music_l-z
drwxr-x---  13 ftpul ftp   344 Oct  1  2005 software
drwxr-x---   2 root  root 4.0K Oct 20 16:17 xfer



You'll see that the permissions on all of the folders are that they are owned by ftpul and the groups are ftp.

Quote:

Code:

root bin daemon sys adm disk wheel floppy dialout tape video



Did you run this as root or user? If its as root then you need to log out and try it as user, and unless you are user ftpul then you don't have permissons to do anything with these folders (output from /etc/group (sorry about the typo btw), suggests that your user name is matt).

Thus try the following..

Code:

$ cd /ftp/
$ su
$ chown -R root:users *


This should be fine as it changes ownership to root, but permissions for users (which your username matt is a member of) to read and write for all directories and sub-directories.

Unless you have any specific intention of executing commands in those directory structures this isn't a problem (all executables should be placed in *bin/ folders).

Fingers crossed it works :-)


Last edited by slackline on Tue Feb 28, 2006 7:53 am; edited 1 time in total
Back to top
View user's profile Send private message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 7:52 am    Post subject: Reply with quote

Groups run as user, not root. Result:
Code:
wheel usb users portage


Result of "chown -R ftpul:ftp *"

ftpul is the account that should own the directory.

Code:
chown: changing ownership of `2backup': Operation not permitted


2backup is the External drive.


Again thanks for your help.
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1477
Location: /uk/sheffield

PostPosted: Tue Feb 28, 2006 7:57 am    Post subject: Reply with quote

Just editied my last message after giving it more thought, have a quick look and see if that sorts it out.

Does the user ftpul exist on your system? Usually when you create users they get assigned their own group, and I couldn't see an ftpul entry in your /etc/group file. That would probably explain a lot of the problems :D
Back to top
View user's profile Send private message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 8:00 am    Post subject: Reply with quote

:(

under /ftp/

Code:
chown -R root:users *

chown: changing ownership of `2backup': Operation not permitted


What could possibly cause this? This is driving me crazy.

Here is a printout of fdisk on /dev/sde

Code:

Disk /dev/sde: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1        5100    40965718+   c  W95 FAT32 (LBA)
/dev/sde2            5101       30163   201318547+   c  W95 FAT32 (LBA)
Back to top
View user's profile Send private message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 8:06 am    Post subject: Reply with quote

Should I have 'dosfstools' emerged?
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1477
Location: /uk/sheffield

PostPosted: Tue Feb 28, 2006 8:07 am    Post subject: Reply with quote

Hmm, no idea why root wouldn't be permitted to perform chown, you were trying...

Code:

$ cd /ftp
$ su
# chown -R root:users *


and not trying to chown as matt?

dosfstools shouldn't be necessary, as they are mainly for creating dos filesystems, this is a mount and permissions problem.


Last edited by slackline on Tue Feb 28, 2006 8:09 am; edited 1 time in total
Back to top
View user's profile Send private message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 8:09 am    Post subject: Reply with quote

I was su'ed into root. I made sure of it.

Code:

Disk /dev/sde: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1        5100    40965718+   c  W95 FAT32 (LBA)
/dev/sde2            5101       30163   201318547+   c  W95 FAT32 (LBA)


Should they be W95 FAT32 (LBA) or just W95 FAT32.

I should also let you know that I created those partitions under windows.
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1477
Location: /uk/sheffield

PostPosted: Tue Feb 28, 2006 8:22 am    Post subject: Reply with quote

I'm afraid I'm at a loss then I've no idea.

I can mount external HD's, flash drives and USB camera devices (seen as fat) no probs using the

Code:

/dev/sda1               /mnt/camera     auto            noauto,noatime,user,rw         0 0


line in my /etc/fstab, perhaps the only difference is I'm using the 'auto' option to determine file type (both are fat systems). You could tray changing that entry in your fstab file.

Further my mount point is very similar to yours (although you could try changing them to reflect what I have)....

Code:

$ ls -l /mnt
drwxr-xr-x 2 root root 4096 Jan 23 08:41 camera


You could try deleting the mount point and creating it again. Beyond that I'm at a loss, sorry.
Back to top
View user's profile Send private message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 8:24 am    Post subject: Reply with quote

Not a big deal, I appreciate all the help even thought it might not have gotten me much further. I'll try some more things and if I get it working i will post what I did so people with the same problem can get a solution.
Back to top
View user's profile Send private message
nilecirb
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jan 2004
Posts: 127

PostPosted: Tue Feb 28, 2006 8:33 am    Post subject: Reply with quote

I'm just wondering, but why don't you format the drive as NTFS and mount it using captive? I've had numerous problems getting vfat to work, but NTFS via captive has never failed me.
Back to top
View user's profile Send private message
RajjPajj
n00b
n00b


Joined: 21 Jan 2005
Posts: 35
Location: Colorado, in the "LV"

PostPosted: Tue Feb 28, 2006 8:33 am    Post subject: Reply with quote

I copied your fstab and it works!!! :D
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1477
Location: /uk/sheffield

PostPosted: Tue Feb 28, 2006 2:41 pm    Post subject: Reply with quote

Cool, glad it worked :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum