Permissions for growisofs

Hi, I’m testing adding data to a DVDR using growisofs. Here’s the command line that I use:

growisofs -M /dev/sr0 -J -R /path_to_files/

Permissions are pernicky, so I make the directory holding the files that will be written to the DVD → drwxrwxrwx and the files themmselves I make rwrwrw.

Here’s how it works for me:
In Suse Linux 10.0 and 10.1 I execute that command as root and it works.
In openSUSE 10.2 I have to execute the command as a normal user, not as root, to satisfy some safety precaution that prevents using growisofs from the CLI as root in 10.2 – but it works as normal user.
In openSUSE 11.0 I execute that command as root and it works.

BUT
In openSUSE 10.3 it makes me operate as normal user, like in 10.2, but even then it stops me with this extra error message:

:frowning: unable to open64("/dev/sr0",O_RDONLY): Permission denied

So I’ve climbed every mountain associated with the ever changing permissions scenarios from one release to the next except that one in 10.3 which stops me from writing to the DVD burner.

Can anyone help with that last one please?

Swerdna

It’s not really a growisofs problem but one of what permissions should the user have on the DVD drive. On SUSE, the resmgr daemon gives the user logged in on the GUI console permission to read and write to optical devices. If you are running this from a remote console or cron job, then you need to give those sessions permission too, using resmgr, possibly via pam.

Thanks ken_yap. I’m logged on as normal user and execute the command as normal user in a KDE Konsole. According to what you say, I should have write access to the DVD burner, is that right? But I get the error message. Any further advice?

Do this:

sudo resmgr dump

One of the lines should be:

grant "swerdna" cdrom

Yes, that line is present.

Hmm, never had any problems using the CD/DVD with growisofs or k3b when logged in as myself. Is this a growisofs from an OpenSUSE package?

Yep – comes standard. I’ve tried 10.0, 10,1, 10.2, 11.0 no probs, all with standard install.
The problem is in 10.3 only (standard install). I’ve got it on two computers – the problem is the same on both.

Hmm, but I’ve never had to run growisofs as root or diddle with file permissions to use it on any of those versions. It just worked. You didn’t make growisofs setuid root or anything like that did you?

No, not a single configuration change from the standard install.
But I first burn on a bootable iso (SystemRescueCD) using this command:

growisofs -Z /dev/sr0=/path_to/systemrescuecd-x86-1.0.2.iso

That’s owned by root so I rub as root.
Then I use this to add the files I want on the DVD:

growisofs -M /dev/sr0 -J -R /path_to_files/

The files are owned by root so I make the containing folder to be drwxrwxrwx and the files to be rwrwrw, just to avoid problems.

It should be sufficient to just make the file readable by you and the directories in the path readable and searchable.

So you are saying the first works and the second doesn’t? I don’t think I have ever made a multi-session DVD so I’ve never exercised the second condition.

The first and second work in all versions 10.x, 11.0, except 10.3.

Oh well, I don’t have any 10.3 machines any more so I can’t check this. But the permission problem had to do with reading the DVD as I recall so it may be some strange situation where the disc isn’t readable at that point, or (that version of) growisofs is confused.

Just remembered something, do you append to the DVD immediately after the initial session, or do you reload the medium first? Try a reload to see if it makes any difference. K3b takes care to reload the medium, notice the eject and load after writing and before verify, so that the kernel gets a fresh look at the DVD. I don’t know if this is relevant or not. Also the error message from growisofs might be relevant, was it “permission denied” or “no medium”?

Oh yeah – it’s relevant!
Actually it was a bit more complex. I was using a portable USB DVDRW (for years). I installed an internal and tried that on version 10.3 – no go. Then your last tip – so I used KDE MyComputer Icon and unmounted the DVD after the first burn – then it worked.

– and so it’s now working. Thanks.

Great. Sometimes you win one.