LinuxQuestions.org
Review your favorite Linux distribution.
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 03-29-2010, 10:25 PM   #1
brian2009
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Rep: Reputation: 1
Deny users access to DVD Drive


Hi all,

I am trying to setup a system that will only allow root access to the DVD drive and no other users. Any ideas on how to accomplish this? I am running RHEL 5.4

Last edited by brian2009; 03-29-2010 at 10:28 PM.
 
Old 03-29-2010, 10:34 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,201

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
chmod 600 /dev/sr0 ?

Last edited by frieza; 03-29-2010 at 10:38 PM.
 
Old 03-29-2010, 10:54 PM   #3
brian2009
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 1
Fieza,
Thank you for the quick response, I don't see /dev/sr0. What I do see is symbolic links of the cd/DVD drive to /dev/hdc. I tried to chmod -R 700 /dev/hdc but to no avail. Any other routes you think i should try?
 
Old 03-29-2010, 10:57 PM   #4
brian2009
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 1
Here is the truncated output from ls -l /dev

lrwxrwxrwx 1 root root 3 Mar 29 22:15 cdrom -> hdc
lrwxrwxrwx 1 root root 3 Mar 29 22:15 cdrom-hdc -> hdc
lrwxrwxrwx 1 root root 3 Mar 29 22:15 cdrw -> hdc
lrwxrwxrwx 1 root root 3 Mar 29 22:15 cdrw-hdc -> hdc
lrwxrwxrwx 1 root root 3 Mar 29 22:15 cdwriter -> hdc
lrwxrwxrwx 1 root root 3 Mar 29 22:15 cdwriter-hdc -> hdc
crw------- 1 root root 5, 1 Mar 29 22:15 console
lrwxrwxrwx 1 root root 11 Mar 29 22:15 core -> /proc/kcore
drwxr-xr-x 6 root root 120 Mar 29 22:15 disk
drwxr-xr-x 2 root root 60 Mar 29 22:16 dri
crw-rw---- 1 root audio 14, 3 Mar 29 22:15 dsp
lrwxrwxrwx 1 root root 3 Mar 29 22:15 dvd -> hdc
lrwxrwxrwx 1 root root 3 Mar 29 22:15 dvd-hdc -> hdc
 
Old 03-29-2010, 10:58 PM   #5
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,201

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
chmod 600 /dev/hdc then
or in your case probably 700
has to be done as root of course
the -R option is to recursivly change permissions of the contents of a directory
if you change the perms of the file a symlink is pointing at you changing the perms of the symlink i believe isnt necessary

Last edited by frieza; 03-29-2010 at 11:06 PM.
 
Old 03-29-2010, 11:11 PM   #6
brian2009
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 1
Tried those changes, but again to no avail. I know I could probably set the permissions on /media but then someone could just mount to another mount point. I was looking around and saw that /etc/udev/rules.d/ directory might be a place to look for setting device permissions. Any thought on this?
 
Old 03-29-2010, 11:32 PM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,201

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
never tried it, but.. good luck
oh in case your wondering
chmod 700 should have set the permissions to
brwx------
600
brw-------
 
Old 03-30-2010, 10:25 PM   #8
brian2009
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 1
Thanks for the help

Thanks for the help. You were right about the chmod. Here is what I did to set the permissions:
set a script in /etc/rc.local

chmod 600 /dev/sr0

To make it persistant at boot.

Then, set the permissions on the /media directory

chmod 600 media

Thanks again!
 
Old 03-31-2010, 07:14 AM   #9
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 548

Rep: Reputation: 116Reputation: 116
I would suggest implementing this in the /etc/fstab rules instead.
 
  


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
deny browse access to users iinfi Linux - Server 2 01-15-2009 01:52 AM
Why cant I see or access my cd-r/rw or my dvd rom drive deatkinson Linux - Newbie 14 03-31-2006 02:43 AM
Kaudiocreator and DVD access for users in Slackware 10? Loslobo Slackware 4 09-02-2004 01:08 AM
allowing set users to mount a drive, access issues Alpha_Beta Linux - Hardware 4 11-12-2003 10:21 PM
Deny some users access to the web with IPtables? osX-linux Linux - Networking 4 06-22-2003 02:42 PM


All times are GMT -5. The time now is 07:06 AM.

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