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

autofs permissions



I am wondering how I can control the permissions of a directory created
dynamicall using autofs.

I have autofs4 enabled (sarge). I have a map for the /mount directory
(called /etc/auto.mount), which has an entry for my floppy drive
(/dev/fd0).

The problem is that ordinary (non root) users cannot write to a floppy.
If I put in a blank floppy and try to copy a file to it (cp <file>
/mount/floppy), the autofs created directory /mount/floppy has
owner.group root.root (the owner/group of /mount),and permissions
rwxr--r-- (the permissions of the /mount directory). 

Presumably autofs is creating the /mount/floppy directory with the
propagated permissions of /mount. I don't want to chmod /mount to
rwxrw-rw-, because that would allow ordinary users to potentially drop
files, etc, into /mount itself.

Does anyone know of a way to affect the behavoir of autofs to create the
subdirectory with the needed permissions? I though of changing the map
to run a script that does the mount and chmod's is; I don't know if that
is possible or not.

I could chgrp /mount to some useful group (like floppy), set its
permissions to rwxrw-r-- and let anyone who needs to write to the floppy
be in the floppy group, but that would still allow those users the
ability to write into /mount, and that's not what is required - they
just need to be able to write into /mount/floppy.

nl





Reply to: