Re: [vox-tech] good reference source for fstab permissions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox-tech] good reference source for fstab permissions
On 2003.07.03 09:18, Jonathan Stickel wrote:
Donald Childs wrote:
Thanks for all the assistance . I'm able to write to the vfat
partition
now, using:
/dev/hdf4 /mnt/fat vfat user,rw,uid=[user],gid=[workgroup] 0 0
but will go back and add the showexec attribute.
This is different from what I use for my fat32 partition(s). I have
in my fstab:
/dev/hda5 /Documents vfat defaults,quiet,umask=0000 0 0
I'd like to learn a little more about these mount options, if someone
cares to enlighten me:
My method mounts on bootup, allows all users read/write permission,
and quiets failed attempts to change file ownership/permissions.
Reading a little of the man page, I get the impression that
"umask=0000" and "quiet" essentially overrides the "suid" implied by
using the "default" option. Is this about right?
It appears that this umask is in agreement with the suid option.
Setting umask=7000 would seem to be in disagreement the suid option but
would seem to be in consonance with the nosuid option.
It seems to me Donald's fstab entry only gives read/write permission
to [user] and [workgroup]. Also, it is not clear to me whether the
partition would mount on startup or with "mount -a" ("auto" option is
not specified). But I can see the ownership/permission problems of
fat is solved by assigning the entire partition to just one user.
How am I here?
I believe it follows the default umask of 022, so only the owner can
write, but everyone else can read and execute. By saying user, anybody
can mount and unmount the partition (I'd bet that this isn't Donald's
intended effect). It appears that it is mounted automatically (like my
vfat partition).
My vfat partition:
/dev/hda6 /home/bloom/mydocs vfat umask=073,uid=1000,gid=1000,
noexec,showexec 0 0
I am also curious about the "showexec" option. If I used it, would
it make "quiet" unnecessary?
No. Showexec just sets the default permissions differently. If you list
your vfat drive now, then you will notice that all directories and
*all* files are rwxrwxrwx. You would probably prefer to have your files
rw-rw-rw- (I found the execute bits especially annoying when working
with xftree, and when burning CD-ROMs) This is what showexec does.
Kernel 2.5.43 and later (according to mount(8)) replace this with fmask
and dmask which set umasks for files and directories, respectively. I
haven't used 2.5.x kernels, so I don't know for sure whether showexec
will be removed, or merely deprecated. It took me a while to discover
showexec because I had been hoping to find something more like fmask
and dmask to begin with.
Quiet prevents chmods and chowns from returning errors. It can be used
with showexec the only difference is the exact set of permissions that
cannot be changed.
Also note that the write bits can actually be changed permenantly (at
least without the quiet option) if all three are the same they affect
the native FAT read-only bit that can also be set from and has an
effect in Windows (if they're not all the same, see your kernel source
to see who wins). And I found that (again, without quiet) other file
permissions (like execute) can be changed temporarly and Linux will
remember the permissions until the operations involving file dates
would fail though (I don't know whether they do with quiet).
--
I usually have a GPG digital signature included as an attachment.
If you don't know what it is, either ignore it or visit www.gnupg.org
My PGP key was last signed 6/10/2003 please download my key again if
it is more recent than your copy. If you use GPG, *please* talk to
me to sign it. The key is keyID E2B2CAD1 on pgp.mit.edu
Attachment:
pgp00004.pgp
Description: PGP signature
|