mount fstab option group
Good day!
I am trying to set up my usb device to be available to mount and umount only for me, not for other users. Using Slackware 12.2 Entry in fstab is as follows: Code:
/dev/disk/by-label/USB /media/usb vfat auto,group,user,noexec,gid=usb,umask=007 0 0 Code:
lrwxrwxrwx 1 root root 1 2010-05-18 20:57 /dev/disk/by-label/USB -> ../../sdd1 Question is: why every user on my system can mount usb device? And what is wrong in my understanding of fstab option group? |
If you're using KDE chances are HAL is helping them ... you could
play with the udev-rules for the device(s). |
Thank you Tinkster.
It is exactly as you said. Playing some evenings with udev I have got what I wanted. Posting this reply just in case it could help someone. Solution for Slackware 12.2. USB plug/unplug event is forwarded to udev. Udev does it's stuff and then forwards to hal. If udev didnot solve mounting, hal does that. Noone acts against fstab settings. But hal does its own magic if no fstab entry for device. I solved all usb drives mounting within udev and fstab. Good udev howto: http://reactivated.net/writing_udev_rules.html udev rules location on Slackware: custom user rules: /etc/udev/rules.d distribution rules: /lib/udev/rules.d Udev useful commands: Code:
#getting udev variables about /dev/sdc1 #I have set them number 78 #After 60 and before system rule 79, because I need fstab info import after device is added. Code:
#Here my custom script provides symlink name As result now group "usb" can mount/unmount usb drives instead of default group "plugdev". Also devices are mounted to places I want according to fstab. No conflicts with hal, both KDE and Gnome work fine. |
Awesome - thanks for posting your solution back in such detail! I'm sure other members
or visitors will find this helpful. Cheers, Tink |
All times are GMT -5. The time now is 07:51 AM. |