LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   VFAT mount permissions (https://www.linuxquestions.org/questions/linux-general-1/vfat-mount-permissions-345321/)

duckboy 07-21-2005 07:21 AM

VFAT mount permissions
 
I've added a FAT32 partition to my fstab to automount the drive on start-up, as follows:

/dev/hda6 /share vfat defaults,umask=0000 0 0

I thought setting the umask to 0000 would ensure that the drive was r/w by everyone, but I'm still experiencing some odd behaviour where the permissions are still 0755 or 0644.

Is this a quirk of the 'still experimental FAT32 ALPHA' mount type, or is there actually some way of ensuring everything is writable?

What I actually want to do is set-up my Apache configuration to point to some websites on the shared mount, without the pain of having to copy them across the filesystems each time I want to switch development between Linux and Windoze (Just because I have to make sure what I'm doing is compatible with IE).

Any suggestions?

aysiu 07-21-2005 08:49 AM

Maybe give this a try?
http://ubuntuguide.org/#automountfat

Bruce Hill 07-21-2005 10:32 AM

Basically the word "defaults" you've included is giving you the problem. From "man mount"
Quote:

defaults
Use default options: rw, suid, dev, exec, auto, nouser,
and async.

duckboy 07-25-2005 07:22 AM

Chinaman: That's not incredibly helpful. I looked in man mount for the different optiions, and didn't think that any of the 'defaults' options would cause any specific problems. Maybe you would like to specify what, precisely, it is about 'defaults' that will be causing me an issue.

Actually, after further investigation, I found that the permissions are correct for the files that matter, and have been able to link the FAT32 directories into my /var/www directory and specify the virtual hosts correctly (after having a few issues with SELinux). Where the permissions seem to get a bit odd is on a directory that is being used by WindozeXP as the "My Documents" directory.

I'll investigate further, anyhow. But for the time being, I've got things working how I want them.

duckboy 07-25-2005 07:24 AM

Of course... Windows cries like a baby everytime I load up now. But I can live with that for having my essential files available in both O/S. One day, when I'm rich, I'll just buy enough 2nd user gear to set-up a small server and just use CVS or something better.

Bruce Hill 07-25-2005 07:39 AM

Re: VFAT mount permissions
 
Quote:

Originally posted by duckboy
I thought setting the umask to 0000 would ensure that the drive was r/w by everyone, but I'm still experiencing some odd behaviour where the permissions are still 0755 or 0644.
Quote:

Originally posted by duckboy
Chinaman: That's not incredibly helpful. I looked in man mount for the different optiions, and didn't think that any of the 'defaults' options would cause any specific problems. Maybe you would like to specify what, precisely, it is about 'defaults' that will be causing me an issue.
From "man mount" ...
Code:

nouser Forbid an ordinary (i.e., non-root) user to mount the file system.  This is the default.
I have no problem automounting FAT32 partitions as user, with r/w priviledges.
Code:

/dev/hda3        /DATA            vfat        user,umask=1000,rw,auto  1  0
Of course, since you might miss this in the man page, too. If by everyone you mean more than one normal user (who can't be everyone since he's only one), you better add a s to user ... like this ... users

duckboy 07-26-2005 03:56 AM

The partition is mounted during boot, which means it is mounted by root, therefore user/nouser permissions are actually irrelevant.

If I wanted an ordinary user to be able to unmount it or remount it when logged in, then I would need to set the attribute to users. But I don't.

As FAT32 (surprisingly) doesn't support UNIX permissions, the kernel handles this by using a umask to 'dummy' the permissions (or, in other words, to give Windows files pseudo-UNIX permissions). I gave the mount the "umask=0000" option, which sets the default permissions to 777 (actually, I'm not certain about how it treats sticky, suid, guid), I.E: anyone, regardless of who mounted the partition, can access the files on the partition. My original query was that the permissions on some directories and files were not 777, but 755 or 644, which is not what I would've expected.


All times are GMT -5. The time now is 03:08 AM.