On Wed, 14 Feb 2001, Ken D'Ambrosio wrote:
> Specifically, he's running Linux on his notebook, and wants to write to
> his DOS partition (okay, VFAT).  I've got it mounted, and all is happy,
> but non-root users don't have write permission.

  You want to look at several options.  (Hint: "man mount" :-)

  "user" will let any user mount the filesystem, but only that user can
unmount it.  "users" will let any user mount or unmount the filesystem.  Both
of these options are void if the user supplies any additional arguments on the
"mount" command line.

  "uid" and "gid" determine what the user-owner and group-owner of the files
and directories will appear as.  In other words, if you "mount -o uid=505",
then all the files will appear to be owned by UID 505.

  "umask" is like the shell's umask; any bits set in umask will *not* be set
on the files in the mounted filesystem.  umask=077 is fairly restrictive;
umask=000 is world read/write/execute.

  The defaults for "uid", "gid", and "umask" default to the corresponding
attributes of the processing calling mount(2).  In other words, if you do not
say otherwise, the permissions of the filesystem will mirror the permissions
of your own Unix shell environment.

> I've poked around, and found two folks with different /etc/fstab
> "solutions," except that neither seems to work -- one doesn't grant
> permission, and the other doesn't seem to mount when I do a "mount -a".

  Yes...

> /dev/hda1       /mnt/windows    vfat    noauto,user,umask=000   0 0

  Er... "noauto" means "do not mount automatically".  :-)  Remove it.  You
might as well remove "user" in that case as well, since "user" will be "root"
if it auto-mounts at boot.  Thus, "umask=000" is about the only option you
will need.  This does, of course, defeat any security on that filesystem, but
one presumes that if you were worried about security, you wouldn't be using
FAT in the first place.  :-)

> /dev/hda1     /mnt/windows    vfat    owner   0 0

  "owner" is like "user", with the additional restriction that the user trying
to accomplish the mount must own the device node special file which is being
mounted.  Since auto-mounting is done as root, and root usually has a
restrictive umask, this is not what you want.

  Hope this helps,

-- 
Ben Scott <[EMAIL PROTECTED]>
Net Technologies, Inc. <http://www.ntisys.com>
Voice: (800)905-3049 x18   Fax: (978)499-7839






**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to