LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-14-2007, 06:35 AM   #1
kutty_prasad
Member
 
Registered: Sep 2006
Location: Bangalore,India
Distribution: RHEL,Fedora, CentOS, Slackware 12 & wrestling with LFS
Posts: 86

Rep: Reputation: 16
/dev/cdrom permission issue.


I'm running Slackware 12 and found this issue which happens after every reboot. /dev/cdrom is a soft link to /dev/hdc. By default the permission on this device file is 660. Now, when i run mplayer and access a DVD/VCD I get a error which says "/dev/cdrom not such file or directory" even though the file is present. When i use XINE and access the DVD/VCD, XINE says permission denied on /dev/cdrom. So I changed the permission on /dev/hdc as 666. This solved the problem with mplayer as well. However, when there is a reboot, the permission becomes 660 again. Is there a permanent solution for this?

Thanks.
 
Old 10-14-2007, 06:44 AM   #2
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
You can edit the fstab and use mode=666 value in 4th column.

Last edited by Alien_Hominid; 10-14-2007 at 06:47 AM.
 
Old 10-14-2007, 08:17 AM   #3
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
Did you add yourself to the cdrom group?

Good groups to add oneself to: cdrom, audio, plugdev, video, users(default).
 
Old 10-14-2007, 08:42 AM   #4
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
ok small related question, what about the groups : disk and floppy? should a normal user add himself there too ?
 
Old 10-14-2007, 09:26 AM   #5
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
I personally do not add anything to any of the groups (please enlighten me if I should) and just change permissions where required.
 
Old 10-14-2007, 09:37 AM   #6
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by Alien_Hominid View Post
I personally do not add anything to any of the groups (please enlighten me if I should) and just change permissions where required.
That's what the groups are there for.

Runs ls -la on dev for cdrom and look at the device ownerships:

Code:
root@sun:/dev# ls -la | grep cdrom
lrwxrwxrwx  1 root root         3 2007-10-13 20:12 cdrom -> hdc
lrwxrwxrwx  1 root root         3 2007-10-13 20:12 cdrom0 -> hdc
brw-rw----  1 root cdrom  22,   0 2007-10-13 20:12 hdc
root@sun:/dev#
hdc is owned by root but in the cdrom group.
Adding a user to the cdrom group gives the user access to this device.
 
Old 10-14-2007, 09:43 AM   #7
alisou
LQ Newbie
 
Registered: Aug 2006
Location: Québec, Canada
Distribution: Slackware based
Posts: 11

Rep: Reputation: 0
Hi all,

I think of the right way is to add user at group cdrom, not to change permissions of devices. For to add kutty user at cdrom group, type this command under root:

# usermod -G cdrom kutty

and relogin after


edit: if cdrom group do not exist, create it before by this command (under root):
# groupadd cdrom

Last edited by alisou; 10-14-2007 at 09:48 AM.
 
Old 10-14-2007, 10:44 AM   #8
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
So where could I get a list where each group purpose is explained. I found it easier to change permissions than to use groups.
 
Old 10-15-2007, 06:12 AM   #9
kutty_prasad
Member
 
Registered: Sep 2006
Location: Bangalore,India
Distribution: RHEL,Fedora, CentOS, Slackware 12 & wrestling with LFS
Posts: 86

Original Poster
Rep: Reputation: 16
Hi All,

Thanks for the replies.

Alien_Hominid : I will try your suggestion first.

Franklin : I think I missed the "cdrom" group while adding the user. I'll check that.

Thanks.
 
Old 10-16-2007, 09:40 PM   #10
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 581

Rep: Reputation: 38
Run "id" as the user. Most of the groups you need are automatically set for you when the user logs in.

Cheers.
 
Old 10-16-2007, 11:51 PM   #11
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Forget this ... fixed ... fstab was a little wrong.

Quote:
bash-3.1$ id
uid=1000(<username>) gid=100(users) groups=17(audio),18(video),19(cdrom),81(messagebus),82(haldaemon),83(plugdev),84(power),100(users),1 04(shutdown)

bash-3.1$ ls -la /dev/ | grep cdrom
lrwxrwxrwx 1 root root 3 2007-10-17 12:58 cdrom -> hda
lrwxrwxrwx 1 root root 3 2007-10-17 12:58 cdrom0 -> hda
brw-rw---- 1 root cdrom 3, 0 2007-10-17 12:58 hda

bash-3.1$ mount /dev/cdrom ~/temp
mount: only root can do that
bash-3.1$ mount /dev/hda ~/temp
mount: only root can do that
Shouldn't I be able to mount it if I am in owner group ?

Last edited by duryodhan; 10-17-2007 at 12:05 AM. Reason: Fixed
 
Old 10-16-2007, 11:51 PM   #12
arcanex
Member
 
Registered: Mar 2007
Posts: 41

Rep: Reputation: 15
Quote:
Originally Posted by MQMan
Run "id" as the user. Most of the groups you need are automatically set for you when the user logs in.

Cheers.
I've always wondered how the groups are automatically set for users. As far as I can see, I don't have any entry for my username in '/etc/group' (except for my primary GID in '/etc/passwd'), yet 'id' shows me as members of other groups.

Can anyone briefly explain this?
 
Old 10-17-2007, 07:19 AM   #13
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by arcanex View Post
I've always wondered how the groups are automatically set for users. As far as I can see, I don't have any entry for my username in '/etc/group' (except for my primary GID in '/etc/passwd'), yet 'id' shows me as members of other groups.

Can anyone briefly explain this?
You should look at the '/etc/login.defs' file;

Code:
excerpt from;
~# cat /etc/login.defs |less

# List of groups to add to the user's supplementary group set
# when logging in on the console (as determined by the CONSOLE
# setting).  Default is none.
#
# Use with caution - it is possible for users to gain permanent
# access to these groups, even when not logged in on the console.
# How to do it is left as an exercise for the reader...
#
# Most of these groups are self-explanatory, with the possible
# exception of "plugdev", which allows the use of plugable devices
# such as USB storage (flash memory sticks, most digital cameras,
# some media players, and other devices), many IEEE1394 (sometimes
# called "FireWire") devices, and more.  For plugdev devices, the
# use of HAL is required.  HAL also helps users interact with
# hardware in the other groups below (and other hardware) more
# easily as well, so it's a good idea to turn HAL on for any
# machine that will be used from the console.
#
# Note that users are added to these default groups only when
# logging into a shell with /bin/login, not when using a login
# manager such as kdm.  In that case, users who should have
# hardware access must be added to the appropriate groups
# when the user is added with adduser or useradd, or by editing
# /etc/group directly.
#
CONSOLE_GROUPS          floppy:audio:cdrom:video:plugdev
 
  


Reply



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
/dev/cdrom links to /dev/sg0 instead of /dev/sr0 -why? Yalla-One Slackware 3 10-01-2006 07:02 PM
/dev/cdrom user permission problems! soupnazi.tar.gz Slackware 4 01-27-2006 04:07 AM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM
user permission issues with /dev/ (sound and cdrom) ngan_yine Slackware 3 11-03-2004 05:09 PM
mounting 2 ide-scsi devices /dev/cdrom and /dev/cdrom1 issue penguin123 Linux - Hardware 3 09-26-2003 08:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:22 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
Open Source Consulting | Domain Registration