*- On 23 Jun, Gertjan Klein wrote about "Autofs for root only??"
>   I am trying to convince autofs to allow others than root to access the
> automounted filesystems, and I'm failing miserably. I can find no
> information on this subject in the man pages.  It appears the problem is
> not directly related to autofs, though, because I fail with standard
> mount as well.  Here is what I did to test:
> 
> asterix:/# mkdir test
> asterix:/# chown root:disk test
> asterix:/# dir test
> drwxrwxr-x   2 root     disk         1024 Jun 23 21:56 test
> asterix:/# mount -t ext2 /dev/hda6 /test -o user,suid,exec
> asterix:/# dir test
> drwxr-xr-x   3 root     root         1024 Jun 22 19:31 test
> asterix:/# dir /dev/hda6
> brw-rw----   1 root     disk       3,   6 Jul 21  1998 
> 
>   For some reason, the mount command changes the permissions of /test
> right back to what they were.  If I log in as a user and try to access
> (write to) the mounted filesystem I'm denied access. The same happens
> with autofs mounted filesystems.
> 
>   What can I do to fix this?
> 

mount -t ext2 /dev/hda6 /test -o suid,gid=<gid-of-disk>,umask=002

Then make sure your user is in the group disk

adduser <user> disk     # user will have to logout and back in

The user option is pointless on the mount command line, it is only
usefull in the /etc/fstab file, see the mount(8) man page.

[EMAIL PROTECTED]/}[237]>ls -dl mnt
   1 drwxr-xr-x   3 root     root         1024 Jun 15 18:20 mnt/
[EMAIL PROTECTED]/}[238]>mount -t vfat /dev/hdc5 /mnt -o gid=35,umask=002
[EMAIL PROTECTED]/}[239]>ls -dl mnt
  16 drwxrwxr-x   4 root     dos         16384 Dec 31  1969 mnt/


So in your autofs.<mountpoint> file use the gid and umask options.

-- 
Brian 
---------------------------------------------------------------------
Mechanical Engineering                              [EMAIL PROTECTED]
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------

Reply via email to