Linux – how to get autofs to mount a partition as rw

autofslinuxmount

I got autofs to mount a partition. It works fine, except I can't get it to mount with write privileges to regular users.

I tried with this in auto.master:

/misc /etc/auto.misc --timeout=60

and this in auto.misc:

data -fstype=vfat,rw :/dev/sda5

And I didn't get it to work.

When I was using fstab, the solution was to let users mount it passing the user mount option. Is there a way to make autofs mount stuff as the current user?

EDIT: forgot to mention, using the user option in auto.misc also didn't work.

Best Answer

Is there a way to make autofs mount stuff as the current user?

Not really, but what you could do is setup a group for users who will be allowed to have access to that resource, add all the users to the group, and then finally pass the gid, umask, and dmask options to set the group, and permissions the fat filesystem will use once it is mounted.

Related Topic