-   Linux - Security (
-   -   fstab, umask and users permissions (

foucault 10-31-2005 02:13 PM

fstab, umask and users permissions
Good evening everybody,

Out of my two win32 partitions, I want the FAT32 one to be set up as following
-> R W X for owner (root)
-> R W X for group (users)
-> R -- X for others

So, my fstab file looks like below

/dev/hdb1            /                    ext3      acl,user_xattr        1 1
/dev/hdb2            /home                ext3      acl,user_xattr        1 2
/dev/hda1            /windows/winC        ntfs      defaults              0 0
#hda5 is the one!
/dev/hda5            /windows/winD        vfat      defaults,umask=002    0 0
/dev/hdb3            swap                swap      pri=42                0 0
devpts              /dev/pts            devpts    mode=0620,gid=5      0 0
proc                /proc                proc      defaults              0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
sysfs                /sys                sysfs      noauto                0 0
/dev/cdrecorder      /media/cdrecorder    subfs      noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/dvd            /media/dvd          subfs      noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0            /media/floppy        subfs      noauto,fs=floppyfss,procuid,nodev,nosuid,sync 0 0

As you can see I've set umask 002 (which really is rwx rwx r-x). However I do not know how to tell fstab that the group that uses the disk is users. I mean that I want hda5 RWX- able for users as well.

hda5 always mounts RWX for root group, not for users. Is there a way that hda5 be RWX for users too? (Yeah there is still is the umask=000 thing, but I want it the right way)

Thnx in advance

makuyl 10-31-2005 02:28 PM

/dev/hda5 /windows/winD vfat defaults,umask=002,gid=users 0 0
should do it.

foucault 11-01-2005 09:54 AM

It did the job!
Thank you.

primo 11-03-2005 01:13 AM

Both ntfs and vfat support dmask= & fmask= so you can turn off those annoying execute bits on files. For ntfs, the feature is undocumented on mount(8) but it has been there all the time (see /usr/src/linux/Documentation/filesystems/ntfs.txt). For vfat, the manpage says kernels >= 2.5.43. When I boot into 2.4.28, the additional flags aren't noticed so I don't see errors. You may use them after umask and they'd be ignored in these earlier kernels

All times are GMT -5. The time now is 10:54 AM.