[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mount as specific user in fstab (su user -c 'mount ~/dir')



> Current /etc/fstab entry is
> 
> /dev/hda11 /home/shri/data  vfat defaults,user,noauto 0 0
> 
> Is there a way to specify it in /etc/fstab so it is mounted under a
> specific uid. I have looked at the mount man page but have come up
> blank.

See uid and gid options in fstab manual. If you change your fstab entry
to:

/dev/hda11 /home/shri/data  vfat defaults,user,noauto,uid=0,umask=000 0 0

your partition's root will be mounted with specified uid. Also, umask=000
will allow all users access defined by the files' privileges (beware: all
writable files on your vfat partition will be _writable_for_all_users_ - 
it might be better to mount the partition with a given gid, you could then 
grant access to the partition with group memberships).  

Regards,

Adam 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Adam Galant 
                                                                  o
Programmer, network administrator                                 O
Telestar Electronics Ltd.                                       /|\/`
                                                               \ |_
phone: (+48) (022) 332 32 85                                   ' | |.
                                                                 |.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 




-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: