LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   CD-rw drive permissions issue. (https://www.linuxquestions.org/questions/ubuntu-63/cd-rw-drive-permissions-issue-544385/)

mitchell7man 04-08-2007 06:02 PM

CD-rw drive permissions issue.
 
In gnome Baker i wan't to burn an audio cd, but when it comes time, after converting audio, it fails, output is this.
Quote:

scsibus: 1 target: 0 lun: 0
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
cdrecord:
cdrecord: For more information, install the cdrtools-doc
cdrecord: package and read /usr/share/doc/cdrecord/README.ATAPI.setup .
Cdrecord-Clone 2.01.01a03 (i686-pc-linux-gnu) Copyright (C) 1995-2005 Joerg Schilling
NOTE: this version of cdrecord is an inofficial (modified) release of cdrecord
and thus may have bugs that are not present in the original version.
Please send bug reports and support requests to <cdrtools@packages.debian.org>.
The original author should not be bothered with problems of this version.

TOC Type: 0 = CD-DA
K3b doesn't work either, if i switch to root user i can burn just fine. What do i do so that i can burn on my normal user account?

GrapefruiTgirl 04-08-2007 07:26 PM

A few ideas/suggestions:

1 - Could you not use SUDO, or would you prefer not to?
1.5 - create a GROUP called CDRECORD, add yourself to it, and change /bin/cdrecord to be of that group.
2 - Create a symlink in /usr/bin pointing to /bin/cdrecord (or wherever it is) and if necessary CHMOD/CHOWN /bin/cdrecord as necessary for your USER/GROUP to execute it.

mitchell7man 04-08-2007 08:26 PM

Ummm, this is a GUI program, i don't know how to do what you recommended, but what i am seeking to do is fix the system so that i can burn cd's on my normal account... so further explanation would be great. :)

GrapefruiTgirl 04-08-2007 10:08 PM

A GUI is just a pretty front-end, summoning a (bunch of) command-line stuff or a not-so-pretty shell-program..
Do you start the GUI with like a desktop icon, or an item in your main menu? If so, try right-clicking the menu/desktop item, and viewing its properties. You ought to be able to see atleast one of two things: (a) the command being executed, and/or (b) the PATH to the executable program.

if (a) is true, try putting the word 'sudo' in front of the existing command, save, and then try it out.
with case (b) navigate the path you see to the location of the actual program, and then consider the steps in my first post, to allow your USER account to execute the application.
:)

mitchell7man 04-08-2007 11:16 PM

This is a case a, i change the command of the launcher to "sudo gnomebaker", and the launcher does not seem to work, I type sudo gnomebaker, in command and gnomebaker launches fine, but the files on my system are not visible, only the folder "root".... so i think this will be a user problem, the question being where is the file to modify, and what exactly do i modify?

mitchell7man 04-13-2007 06:06 PM

I am still in this situation, I have figured out how to specify location by manually entering the location and file, rather than browsing for the file, but I would like to get my burning programs (all of them have issues) to be able to burn cd's and dvds, what do i need to do, do i need to change drive access setting (reading from cd's is not a problem), or is it in the programs, or what could the problem be?, I am a relative newbie so details are appreciated greatly.

GrapefruiTgirl 04-13-2007 06:40 PM

Did you try locating the binary 'cdrecord' and CHMODding it to executable by users? To locate the file quickly, type 'locate cdrecord'.

Another option, would be to maybe move the binary program 'cdrecord' out of its location in /bin or wherever, and put it into /usr/bin or into one of your own folders in your /home/mitchellman area, and CHOMD it to be USER=mitchelman (or whoever your user is) and GROUP=users. If this is a problem because the cd-GUI's cannot seem to locate the program, put a symlink into place of where you removed the cdrecord program FROM, and point it to the new location.

The command 'gnomebaker' that you see in properties of the launcher, is to run the GUI. The GUI in turn, calls on the program 'cdrecord' to actually do the burning. So the permissions of the program 'gnomebaker' is not the problem; you can run that just fine. It is the 'cdrecord' program that is causing the problem, because it is owned by ROOT,ROOT and located in /bin or something.:)

fragos 04-13-2007 08:08 PM

I don't recognize sg0 although it exists in my Feisty /dev. The cd-rw in all the distros I can remember is hdc with mount points of /dev/cdrw and perhaps /dev/dvdrw. I have no problem burning in Fiesty.

GrapefruiTgirl 04-13-2007 10:00 PM

@ Fragos

Oddly enough, I cannot say for sure of I've seen 'sg0' before, but when I run cdrecord as non-root with dev-/dev/hdb, I get 'Cannot open device /dev/pg0' but when I su to root, it successfully finds and uses /dev/hdb. Not sure where it gets the sg0's and pg0's from, but it's only when running these CD tools as user. I can't even imagine a device with initials p.g. or s.g.

mitchell7man 04-13-2007 11:22 PM

Hello, i think i understand what the idea is, but strangely enough, i don't think i have ever had to "chmod" anything before, so i do not know exactly what to do. mitchellj@mitchellj-desktop:~$
Quote:

locate cdrecord
/var/lib/dpkg/info/cdrecord.conffiles
/var/lib/dpkg/info/cdrecord.config
/var/lib/dpkg/info/cdrecord.list
/var/lib/dpkg/info/cdrecord.md5sums
/var/lib/dpkg/info/cdrecord.postinst
/var/lib/dpkg/info/cdrecord.postrm
/var/lib/dpkg/info/cdrecord.templates
/etc/cdrecord
/etc/cdrecord/cdrecord
/etc/cdrecord/rscsi
/etc/default/cdrecord
/usr/bin/cdrecord
/usr/bin/cdrecord.mmap
/usr/bin/cdrecord.shm
/usr/share/bug/cdrecord
/usr/share/bug/cdrecord/presubj
/usr/share/doc/cdrecord
/usr/share/doc/cdrecord/examples
/usr/share/doc/cdrecord/examples/cdrecord.dfl
/usr/share/doc/cdrecord/examples/rscsi.dfl
/usr/share/doc/cdrecord/NEWS.Debian.gz
/usr/share/doc/cdrecord/README.ATAPI.setup.ubuntu
/usr/share/doc/cdrecord/README.DVD.Debian
/usr/share/doc/cdrecord/README.Debian.gz
/usr/share/doc/cdrecord/changelog.Debian.gz
/usr/share/doc/cdrecord/changelog.gz
/usr/share/doc/cdrecord/copyright
/usr/share/man/man1/cdrecord.1.gz
/usr/share/man/man1/cdrecord.mmap.1.gz
/usr/share/man/man1/cdrecord.shm.1.gz
that is the output of locate cdrecord, it seems to me that there are multiple copies? (no idea how that happened) -(if that is the case), anyway, i know this might be frustrating but what exactly do i do to "chmod" cdrecord, seeing as i have never "chmoded" before details again are appreciated :) I understand your explanation perfectly, and therefore understand the problem but i don't know exactly what to do to change the permissions, i prefer option 1, that is chmoding it in it's original folder if that is easier as it would seem. Thanks again,

GrapefruiTgirl 04-14-2007 12:37 AM

Check the manual page for CHMOD (change mode). CHOWN (change owner), and CHGRP (change group) for details on these commands.
I would think the file at /usr/bin/cdrecord is the binary program we are looking for. Not sure what all those other ones are, in the /etc folder.
If so, then what we want here to make it totally executable by all would be "chmod a+x /usr/bin/cdrecord" though it should already be executable, and then "chown <yourname>:users usr/bin/cdrecord" where <yourname> is your user name on your system, to make it owned by you, and of the group USERS, which you should be in..

mitchell7man 04-14-2007 06:56 PM

Ok, chmod ran well, but not chown,
Quote:

mitchellj@mitchellj-desktop:~$ sudo chmod a+x /usr/bin/cdrecord
Password:
mitchellj@mitchellj-desktop:~$ sudo chown <mitchellj>:users usr/bin/cdrecord
bash: mitchellj: No such file or directory
mitchellj@mitchellj-desktop:~$ sudo chown <mitchellj-desktop>:users usr/bin/cdrecord
bash: mitchellj-desktop: No such file or directory
mitchellj@mitchellj-desktop:~$ chown <mitchellj>:users usr/bin/cdrecord
bash: mitchellj: No such file or directory
mitchellj is my username so i don't know what went wrong?

GrapefruiTgirl 04-14-2007 07:05 PM

OK, you arent supposed to have the < and > in there in the actual command--- that's just to show you that you need to put something there.
Try again without the <brackets> :)

mitchell7man 04-15-2007 02:39 PM

Ok, hey, i tried to burn a cd from .iso, it came out with an error after burning,.... (it was ubuntu.iso) i booted from the disk and all appeared fine, i did the cd integrity test and it worked too,... so what's up with that? -thanks for all the help :)

GrapefruiTgirl 04-15-2007 06:35 PM

What was the nature of the error it gave after the burning??

To verify that it did infact burn 100% correct, check the md5sum of the .ISO file, and compare it to the md5sum of your newly burned disk.
Sometimes, the disk will 'work' for you, but if you copy it for someone else for example, it won't boot on their computer.
If the md5sums match, it's all good! :)


All times are GMT -5. The time now is 06:44 PM.