Stupid permissions problems with Debian-Fixed, thanks cleverhandle

Chaotic42

Lifer
Jun 15, 2001
34,415
1,601
126
The permissions aren't stupid, I am :D

I'm having a brain fart or something. Anyway, here's my partition structure:


/dev/sda2-/
/dev/sda3-/home
/dev/hda5-/mnt/music

My problem is that my user account can't access VFAT partitions unless he mounts them. Even as root I can't change the permissions to the directory when VFAT is mounted. If it's not mounted, and I change the permissions, then mount it, my user still can't access it. The access date on the directory also shows up as Dec 31, 1969.

What am I doing wrong?
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
VFAT doesn't support true permissions, so it doesn't work quite the way you expect it to. What you can do is provide mount options that will map the filesystem to specified users, groups, and permissions - check out the mount man page for details. So then you do something like map the gid to a group that all relevant users belong to and set the permissions to make the files group writable.

This came up on this board in this last week - you might find some more info in that thread.
 

Chaotic42

Lifer
Jun 15, 2001
34,415
1,601
126
Originally posted by: cleverhandle
VFAT doesn't support true permissions, so it doesn't work quite the way you expect it to. What you can do is provide mount options that will map the filesystem to specified users, groups, and permissions - check out the mount man page for details. So then you do something like map the gid to a group that all relevant users belong to and set the permissions to make the files group writable.

This came up on this board in this last week - you might find some more info in that thread.

Sorry, yeah, I know VFAT doesn't support permissions. I just thought that mounting VFAT made it world readable. I'll check out that thread. Thanks!
 

Chaotic42

Lifer
Jun 15, 2001
34,415
1,601
126
Ok, I've got it. I should have checked the mount man page earlier. Thanks!

By the way it's:

mount /dev/hda5 -t vfat -o uid=0 -o gid=29 -o umask=023 /mnt/music/

:D
 

manly

Lifer
Jan 25, 2000
12,938
3,703
136
mount /dev/hda5 -t vfat -o uid=0 -o gid=29 -o umask=023 /mnt/music/
Or alternatively:

mount /dev/hda5 -o uid=0,gid=29,umask=023 /mnt/music/

The FS type is automatically determined, and the options can be comma-delimited. You probably want to stick an entry in /etc/fstab.
 

Chaotic42

Lifer
Jun 15, 2001
34,415
1,601
126
Originally posted by: manly
mount /dev/hda5 -t vfat -o uid=0 -o gid=29 -o umask=023 /mnt/music/
Or alternatively:

mount /dev/hda5 -o uid=0,gid=29,umask=023 /mnt/music/

The FS type is automatically determined, and the options can be comma-delimited. You probably want to stick an entry in /etc/fstab.

Yeah, already did that. Thanks!