Bug 26925 - k3b complains about no growisofs when it exists
Summary: k3b complains about no growisofs when it exists
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-09 03:20 CEST by w unruh
Modified: 2020-07-09 18:49 CEST (History)
3 users (show)

See Also:
Source RPM: k3b-19.04.0-1.mga7
CVE:
Status comment:


Attachments

Description w unruh 2020-07-09 03:20:59 CEST
Description of problem: I have k3b installed and have installed the cdrtools package from OpenMandriva as it handles writing and drives better than does cdrkit. I have also installed dvd+rw-tools with the file growisofs
ls -l /bin/growisofs
-rwxr-xr-x 1 root root 115288 Sep 23  2018 /usr/bin/growisofs

When I run k3b as root it complains that growisofs does not exist. 

Unable to find growisofs executable
K3b uses growisofs to actually write DVDs. Without growisofs you will not be able to write DVDs. Make sure to install at least version 5.10.
Solution: Install the dvd+rw-tools package.

Yes, I know that I should not, for some reason, run k3b as root. But it should not be giving false error messages even if i do so.

(If I run as user, not such complaint occurs)
Comment 1 David GEIGER 2020-07-09 07:16:03 CEST
dvd+rw-tools is already required by k3b:

$ urpmq --whatrequires dvd+rw-tools
2mandvd
acetoneiso
backupninja
bombono-dvd
dvd+rw-tools
dvdstyler
k3b
k9copy
mythtv-plugin-archive
silicon

CC: (none) => geiger.david68210

Comment 2 w unruh 2020-07-09 08:11:58 CEST
Yes, and as said, it IS installed. Despite being installed, running k3b as root says /bin/growisofs is not there (as I showed, it is there). There is a bug in k3b when run by root which cannot find growisofs (or dvd+rw-tools)
Comment 3 David GEIGER 2020-07-09 08:36:19 CEST
This soft shouldn't be open as root, so I close this bug as INVALID!

This is not a bug nor in k3b and nor in Mageia. If something don't work as root please open a new bug upstream at https://bugs.kde.org/

Resolution: (none) => INVALID
Status: NEW => RESOLVED

Comment 4 w unruh 2020-07-09 09:56:12 CEST
It is certainly a bug in k3b. It is k3b, not kde, that complains about not being able to find growisofs. While the suggestion is that k3b not be run as root for security reasons,  finding or not finding growisofs is not a security issue. (it is hard for me to imagine how running it as root would be a security issue, and if I want to backup root owned files to dvd I need to run as root. It is far more of a security issue to make the files readable by users.)

Status: RESOLVED => REOPENED
Resolution: INVALID => (none)

Comment 5 David GEIGER 2020-07-09 10:00:07 CEST
So please file a new bug upstream at https://bugs.kde.org/enter_bug.cgi?product=k3b

And k3b is a kde project!
Comment 6 Nicolas Lécureuil 2020-07-09 10:31:09 CEST
you see this behaviour only as root or in user too ?

CC: (none) => mageia

Comment 7 Nicolas Lécureuil 2020-07-09 10:53:46 CEST
(In reply to w unruh from comment #2)
> Yes, and as said, it IS installed. Despite being installed, running k3b as
> root says /bin/growisofs is not there (as I showed, it is there). There is a
> bug in k3b when run by root which cannot find growisofs (or dvd+rw-tools)

i have to disagree as you say:

Solution: Install the dvd+rw-tools package.


it means that it is not installed if the solution is to install it.
Comment 8 Frank Griffin 2020-07-09 15:23:21 CEST
IIRC, root runs with a PATH that does not include /bin, only /sbin (for security reasons - you don't want software designed to run as non-root to inadvertently get run with root privileges).  That would explain why root k3b can't find /bin/*.

Conversely, the default PATH for non-root users includes /bin but not /sbin.

CC: (none) => ftg

Comment 9 w unruh 2020-07-09 17:34:15 CEST
OK, will do in reporting upstream.

Re the PATH, /bin is in roots path. There are far to many programs root needs to not have /bin or /ur/bin in rooth PATH. ls, bash, mv, passwd,....

I did not say "Solution: install dvd+rw-tools" That was the solution presented to me by k3b, a singularly useless solution since it was installed.

I am completely confused by this problem since it is hard to see how k3b can find growisofs if run as a user but not if run as root. Anyway I will revert this to INVALID. It would be helpful to me if someone else were to run this as root to see if the same problem occured for them
Eg, commandline
sudo k3b

Resolution: (none) => INVALID
Status: REOPENED => RESOLVED

Comment 10 Frank Griffin 2020-07-09 18:02:10 CEST
My root PATH has /usr/bin, but I wasn't sure that in the dim past I hadn't done that as a local mod.

My burner is tied up with backups at the moment, but you can test this by running as root:

   strace -f -o /tmp/strace k3b

and then try to urn something.  When you get the error, quit out, and edit /tmp/strace.  Look for occurrences of "growisofs" and you'll see what it's actually looking for.  You can do the same from a non-root ID and compare the two.

Just out of curiosity, do you get the same result with:

   su -l
   k3b

as you do with sudo ?
Comment 11 w unruh 2020-07-09 18:09:56 CEST
OK, if I run it under strace, there is no problem and finds growisofs. If I run it directly it throws that error. 
race condition? Bizarre.
Comment 12 Frank Griffin 2020-07-09 18:49:17 CEST
Just to double-check, did you run the strace as root ?

Note You need to log in before you can comment on or make changes to this bug.