Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Programs cannot access CD Drives as user [SOLVED].
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
insane_rosenberg
n00b
n00b


Joined: 19 May 2005
Posts: 45
Location: Melbourne, Australia

PostPosted: Sat Jan 21, 2006 8:43 am    Post subject: Programs cannot access CD Drives as user [SOLVED]. Reply with quote

Hey Guys,

At the moment I am unable to burn cd's using k3b, or listen to audio cd's, or watch DVD's, using any media player as apparently as user I do not have the required access privelges. It all seems to work fine when I'm logged in as root.

/etc/fstab:
Code:
none         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0
/dev/hdg1      /boot      ext2      defaults,noatime   1 2
/dev/hdg2      none      swap      sw         0 0
/dev/hdg3      /      ext3      noatime         0 1
/dev/hdf1      /shared      vfat      noatime,uid=1000,gid=100 0 1

/dev/hdc                /media/cdrom            auto    user,exec,noauto,managed 0 0
/dev/hda                /media/cdrecorder       auto    user,exec,noauto,managed 0 0
/dev/floppy/0           /media/floppy           auto    user,exec,noauto,managed 0 0


Any pointers?


Last edited by insane_rosenberg on Sun Jan 22, 2006 10:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Sat Jan 21, 2006 8:48 am    Post subject: Reply with quote

Check the permissions of the device by running
Code:
ls -l /dev/hdX

You might need to be part of the same group that the device is assigned to (probably "cdrom", "cdrw" or something).


Last edited by lnxz on Sat Jan 21, 2006 9:05 am; edited 1 time in total
Back to top
View user's profile Send private message
ectospasm
l33t
l33t


Joined: 19 Feb 2003
Posts: 711
Location: Mobile, AL, USA

PostPosted: Sat Jan 21, 2006 8:51 am    Post subject: Reply with quote

There are a couple of different things you could do. First, check that your normal (non-root) user is a member of these groups: cdrom, cdrw. There may be other groups that you need to be a part of, perhaps dvd or something. You might want to check to see if those groups exist first (look in /etc/group).

Another, probably easier option is to add the "user" option to each drive. This will allow normal users to mount and unmount those drives.
_________________
Join the adopt an unanswered post initiative today
Join the EFF!
Join the Drug Policy Alliance!
Back to top
View user's profile Send private message
insane_rosenberg
n00b
n00b


Joined: 19 May 2005
Posts: 45
Location: Melbourne, Australia

PostPosted: Sun Jan 22, 2006 1:04 am    Post subject: Reply with quote

Nah, still no love guys.

k3b complains that it cannot find a suitable writer.

Kaffeine that: "The Source an't be read.
Maybe you dont have enough rights for this source..."

Again both things are still working as root.

lnxz... I tried to check the permissions, but it didn't tell me anything about groups.

For the burner:
Code:
 ls -l /dev/hda
brw-rw---- 1 root disk 3, 0 Jan 22 08:41 /dev/hda


And DVD rom:
Code:
 ls -l /dev/hdc
brw-rw---- 1 root disk 22, 0 Jan 22 08:41 /dev/hdc


My /etc/group file:
Code:
oot:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root,adm
lp:x:7:lp
mem:x:8:
kmem:x:9:
wheel:x:10:root,insane
floppy:x:11:root,insane
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:man
cron:x:16:cron
console:x:17:
audio:x:18:insane
cdrom:x:19:insane
dialout:x:20:root
ftp:x:21:
sshd:x:22:
at:x:25:at
tape:x:26:root
video:x:27:root,insane
squid:x:31:squid
gdm:x:32:gdm
xfs:x:33:xfs
games:x:35:insane
named:x:40:named
mysql:x:60:
postgres:x:70:
cdrw:x:80:insane
apache:x:81:
nut:x:84:
usb:x:85:insane
vpopmail:x:89:
users:x:100:games,insane
nofiles:x:200:
qmail:x:201:
postfix:x:207:
postdrop:x:208:
smmsp:x:209:smmsp
slocate:x:245:
portage:x:250:portage
utmp:x:406:
nogroup:x:65533:
nobody:x:65534:
rpc:x:111:
messagebus:x:407:
haldaemon:x:408:


'insane' is the name of my normal user. However it is also the system name. Any more tips would be greatly appreciated.
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Sun Jan 22, 2006 6:43 am    Post subject: Reply with quote

Both devices belong to the group disk, so you could try adding yourself to that group.
Back to top
View user's profile Send private message
insane_rosenberg
n00b
n00b


Joined: 19 May 2005
Posts: 45
Location: Melbourne, Australia

PostPosted: Sun Jan 22, 2006 10:24 pm    Post subject: Reply with quote

Thanks guys, that seems to have done the trick. I just didn't realise that that was the group name, when I did the:
Code:
ls -l /dev/hda

I just thought it was telling me that they were a disk (drive).

Thanks for all the help, my working /etc/group file is below.

Code:
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root,adm,insane
lp:x:7:lp
mem:x:8:
kmem:x:9:
wheel:x:10:root,insane
floppy:x:11:root,insane
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:man
cron:x:16:cron
console:x:17:
audio:x:18:insane
cdrom:x:19:insane
dialout:x:20:root
ftp:x:21:
sshd:x:22:
at:x:25:at
tape:x:26:root
video:x:27:root,insane
squid:x:31:squid
gdm:x:32:gdm
xfs:x:33:xfs
games:x:35:insane
named:x:40:named
mysql:x:60:
postgres:x:70:
cdrw:x:80:insane
apache:x:81:
nut:x:84:
usb:x:85:insane
vpopmail:x:89:
users:x:100:games,insane
nofiles:x:200:
qmail:x:201:
postfix:x:207:
postdrop:x:208:
smmsp:x:209:smmsp
slocate:x:245:
portage:x:250:portage
utmp:x:406:
nogroup:x:65533:
nobody:x:65534:
rpc:x:111:
messagebus:x:407:
haldaemon:x:408:
Back to top
View user's profile Send private message
Black
Apprentice
Apprentice


Joined: 10 Dec 2002
Posts: 158
Location: Québec, Canada

PostPosted: Sun Mar 12, 2006 4:15 am    Post subject: Reply with quote

Actually, I don't think adding a non-root user to the "disk" group is "the right answer", because I think your user can now write arbitrary data to any disk.

I was with the same problem since my last reboot. I changed the group to "cdrom" instead. Also, I noticed that my /dev/dvd symbolic link was missing, as well as my /dev/cdrom and /dev/cdr.

But, this leaves me with this question: how do I make these changes persistent over a reboot? While I could add the commands to the rc.local file, I think the correct way would be to have udev take care of it.

Kernel 2.6, udev.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum