Red Hat Bugzilla – Bug 45166
RFE: mount with dev permissions
Last modified: 2007-04-18 12:33:46 EDT
I really like the way pam_console sets the permissiond on, e.g., /dev/fd0.
However, i'd like to use autofs for my floppy and then the permissions
won't help since autofs runs as root and hence a floppy is mounted
with owner root. Hence I currently use a little script to change
a uid=...,gid=... option in the automounter map each time a user logs in
(i.e., I added the following to /etc/X11/xdm/GiveConsole
MYUID=`id -u $USER`
MYGID=`id -g $USER`
sed "s/uid=[0-9]*/uid=$MYUID/g;s/gid=[0-9]*/gid=$MYGID/g" /etc/auto.mnt >
mv -f /etc/auto.mnt. /etc/auto.mnt
and a similar line to /etc/X11/xdm/TakeConsole) However, I think the right
thing(TM) to do this would be by adding this feature to pam_console...
See also bug #20410
The pam_console module probably isn't the right place for this -- it only has a
chance to do its thing when you log in, and you'd want this to be done whenever
the filesystem is mounted. This leads me to believe that this should either be
an autofs feature, or a generic flag given to mount (something like the uid=
flags, but in a "use the device's owner/group instead of the current user/group"
I guess you are right, the right place would be mount. I'll
transfere this bug to mount.
Realistically, this feature is most likely to be implemented by
someone sending in a patch...
Please, send this request to upstream developer(s). This is not right place for
requests like this one. Thanks.