LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-07-2009, 12:59 AM   #1
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
Thumbs up 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
 
Old 06-07-2009, 01:09 AM   #2
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 37
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

Last edited by okos; 06-10-2009 at 01:31 AM.
 
Old 06-07-2009, 09:09 AM   #3
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 37
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>"

Last edited by saagar; 06-07-2009 at 09:11 AM.
 
Old 06-07-2009, 02:30 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 06-10-2009, 01:11 AM   #5
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 37
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.

Last edited by okos; 06-10-2009 at 01:38 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to restrict user for just one directory? J0sep Linux - Security 5 12-02-2008 05:49 PM
Restrict the user working directory ust Linux - Newbie 3 10-31-2008 12:42 AM
Restrict directory access nazimrj Linux - Newbie 9 09-13-2006 09:49 AM
restrict newuser directory access lonerangerusa Linux - Security 2 05-02-2003 03:41 PM
Restrict directory access bdu Linux - Security 1 02-07-2002 01:13 PM


All times are GMT -5. The time now is 05:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration