Unix Technical Forum

cdrom permissions

This is a discussion on cdrom permissions within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> micke wrote: > You should try adding your user to the group cdrom (owner is root), my user is ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-20-2008, 02:14 PM
Filippo
 
Posts: n/a
Default Re: cdrom permissions

micke wrote:

> You should try adding your user to the group cdrom (owner is root),


my user is already a member of cdrom group:

>> fil@box:~$ groups
>> users audio video cdrom burning


> since
> that is the group that /dev/cdrom belongs to. If not even that helps then
> it must be somewhere else there is an error. Since it should help giving
> everyone the rights rw to /dev/sr0.Wich other groups are your user a
> member of?


see quote above (plus group "root")

> If you put in a music cd in the cdplayer and starts
> Kaudiocreator, what response do you get? You said that you don't get any
> error msg, but you should get something else.


kaudiocreator reads the cd, then successfully queries cddb, but when I start
ripping, it stalls in pause.

Maybe I have found something. Read this:

fil@box:~$ cdda2wav
cdda2wav: Permission denied. Cannot open '/dev/sg1'. Cannot open SCSI
driver.
cdda2wav: For possible targets try 'cdda2wav -scanbus'. Make sure you are
root.
Use the script scan_scsi.linux to find out more.
Probably you did not define your SCSI device.
Set the CDDA_DEVICE environment variable or use the -D option.
You can also define the default device in the Makefile.
For possible transport specifiers try 'cdda2wav dev=help'.
fil@box:~$ ls -l /dev/sg1
crw------- 1 root root 21, 1 1999-04-13 06:24 /dev/sg1
fil@box:~$ su -
Password:
root@box:~# chmod 666 /dev/sg1
root@box:~# exit
logout
fil@box:~$ cdda2wav
cdda2wav: Permission denied. Cannot open '/dev/sg2'. Cannot open SCSI
driver.
cdda2wav: For possible targets try 'cdda2wav -scanbus'. Make sure you are
root.
Use the script scan_scsi.linux to find out more.
Probably you did not define your SCSI device.
Set the CDDA_DEVICE environment variable or use the -D option.
You can also define the default device in the Makefile.
For possible transport specifiers try 'cdda2wav dev=help'.
fil@box:~$ ls -l /dev/sg2
crw------- 1 root root 21, 2 1999-04-13 06:24 /dev/sg2
fil@box:~$ su -
Password:
root@box:~# chmod 666 /dev/sg2
root@box:~# exit
logout
fil@box:~$ cdda2wav
cdda2wav: Permission denied. Cannot open '/dev/sg3'. Cannot open SCSI
driver.
cdda2wav: For possible targets try 'cdda2wav -scanbus'. Make sure you are
root.
Use the script scan_scsi.linux to find out more.
Probably you did not define your SCSI device.
Set the CDDA_DEVICE environment variable or use the -D option.
You can also define the default device in the Makefile.
For possible transport specifiers try 'cdda2wav dev=help'.

What do you think?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-20-2008, 02:14 PM
micke
 
Posts: n/a
Default Re: cdrom permissions

Filippo wrote:

>snip
>
> kaudiocreator reads the cd, then successfully queries cddb, but when I
> start ripping, it stalls in pause.


This I never seen before, starting reading then stops!! Interesting!
>
> Maybe I have found something. Read this:
>

You have !
> fil@box:~$ cdda2wav
> cdda2wav: Permission denied. Cannot open '/dev/sg1'. Cannot open SCSI
> driver.
> cdda2wav: For possible targets try 'cdda2wav -scanbus'. Make sure you are
> root.
> Use the script scan_scsi.linux to find out more.
> Probably you did not define your SCSI device.
> Set the CDDA_DEVICE environment variable or use the -D option.
> You can also define the default device in the Makefile.
> For possible transport specifiers try 'cdda2wav dev=help'.
> fil@box:~$ ls -l /dev/sg1
> crw------- 1 root root 21, 1 1999-04-13 06:24 /dev/sg1
> fil@box:~$ su -
> Password:
> root@box:~# chmod 666 /dev/sg1
> root@box:~# exit
> logout
> fil@box:~$ cdda2wav
> cdda2wav: Permission denied. Cannot open '/dev/sg2'. Cannot open SCSI
> driver.
> cdda2wav: For possible targets try 'cdda2wav -scanbus'. Make sure you are
> root.
> Use the script scan_scsi.linux to find out more.
> Probably you did not define your SCSI device.
> Set the CDDA_DEVICE environment variable or use the -D option.
> You can also define the default device in the Makefile.
> For possible transport specifiers try 'cdda2wav dev=help'.
> fil@box:~$ ls -l /dev/sg2
> crw------- 1 root root 21, 2 1999-04-13 06:24 /dev/sg2
> fil@box:~$ su -
> Password:
> root@box:~# chmod 666 /dev/sg2
> root@box:~# exit
> logout
> fil@box:~$ cdda2wav
> cdda2wav: Permission denied. Cannot open '/dev/sg3'. Cannot open SCSI
> driver.
> cdda2wav: For possible targets try 'cdda2wav -scanbus'. Make sure you are
> root.
> Use the script scan_scsi.linux to find out more.
> Probably you did not define your SCSI device.
> Set the CDDA_DEVICE environment variable or use the -D option.
> You can also define the default device in the Makefile.
> For possible transport specifiers try 'cdda2wav dev=help'.
>
> What do you think?

This is very odd behavior. It seems to scan every target it can find and
moves the cd-drive to next when you change the rights. Very strange indeed.
Perhaps you could try this, your cd-drive is not /dev/sr0 as you thought in
the beginning, it seems that your /dev/cdrom should be linked to one of the
mentioned /dev/sg? .
If you are using a cd-burner and kernel 2.6.x AND you have ide-scsi=/dev/hdx
in your /etc/lilo.conf then you should remove it and make sure that udev
starts properly to fix the links needed.

If you use kernel 2.4.x then you need to figure out witch /dev/srx
OR /dev/sgx that points to your cd-burner. If you only have a cd-reader
then you don't need the ide-scsi=/dev/hdx in your /etc/lilo.conf.

Let me know how it goes. This was interesting, I haven't even been able to
recreate the problem on my comp.

/Micke

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-20-2008, 02:15 PM
Alan_C
 
Posts: n/a
Default Re: cdrom permissions

Filippo <no.spam@here.ok> writes:

> I am trying to use Kaudiocreator to rip, but I can do it only being root.
> Unfortunately Kaudiocreator does not give me any error message, not even if
> I launch it from the konsole.


oops, your's is k something (mine uses cli). anyways, I don't advocate
to use sudo for this. but here's what I did (uses sudo)(2.4 kernel):

root@AB60R:~# cat /etc/sudoers
# sudoers file.
#
# User alias specification
User_Alias TRUSTED = al
Cmnd_Alias TOOLS = /sbin/mount,/sbin/umount,/home/al/bin/cdrecordeasy
TRUSTED ALL = NOPASSWD:TOOLS


al@AB60R:~$ cat .bashrc
# 3-10-2005 user al bash settings
alias cdr='sudo /home/al/bin/cdrecordeasy'


root@AB60R:~# cat /etc/lilo.conf
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda
message = /boot/boot_message.txt
prompt
timeout = 50
append = "hdd=ide-scsi"

# -------------------------------------

10.2 Slack 2.4 kernel here.
--

about the append line in lilo.conf up above:
(I think so but I sometimes forget)
I had to add the/that one line the append line to
lilo.conf (shouldn't need if use 2.6 kernel)

also: i cheated (to burn cd, needed to be root) I took easy way out and
created a sudo entry with a corresponding alias (cdr) in .bashrc

cdrecordeasy is a Perl script that I use for to burn cd.

works very fine here to burn cd as user al

I'm yet to learn ripping, etc.

--
Alan_Cu b c n u
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com