How to restrict RHEL5 to mount to /media directory
Friends,
When a normal user double click the CD drive icon, the CD file system gets mounted to /media/<name> directory. How do I restrict it. what is the configuration file which states "when a double click is made mount to /media/<name>? thanks |
You need to set up a udev rule for the cdrom.
I had the same issue with a usb hdd with three partitions. At times when I would plug in the drive it would have different mount points and/or different device label. So I wrote a rule for it and also added a fstab entry depicting who could mount the drives and a statc mount point. That solved all my problems. See the following tutorial on writing udev rules. http://reactivated.net/writing_udev_rules.html |
thanks a lot.
We can do this way too, is it not? make /media directory's permission 700.(in my case with /media as the only mount point) again, Could you let me know is there a configuration file which states "when a double click is made mount to /media/<name>" |
I still don't get where you're heading with this; does it
bother you that people can mount stuff at all, or is it the mount-point you're really worried about (which, quite frankly, doesn't make all that much sense)? What are you trying to achieve? And what's the rationale? Cheers, Tink |
Tink,
I think what he is getting at is that the mount point changes. For example, it could be /media/disk, /media/cd etc .... I know that happened to me when I had my ipod mounted before my usb hdd or visa versa. |
All times are GMT -5. The time now is 07:14 AM. |