Open jagajaga opened 7 years ago
Try adding your user to cdrom
group. However, k3bsetup
is another problem...
Attn. @svanderburg @Phreedom (K3B maintainers)
@abbradar adding myself to cdrom
group doesn't help :(
I have the same problem, being in the "cdrom" group doesn't help and k3bsetup results in /run/current-system/sw/bin/k3bsetup: line 16: kcmshell4: command not found
At the moment I can't burn a cd. Brasero doesn't list my write device and can only write images to my hard drive, and k3b has the same issue as OP. I don't know how to do it otherwise. I'm in the cdrom group.
I also tried to chown /dev/cdrom to my user without sucess. (I changed it back to root:cdrom).
same issue with 17.03 stable
Just helped someone work around this; stracing k3b gave the cdrecord command it was running, and invoking that manually produced this:
cdrecord: Operation not permitted. rezero unit: scsi sendcmd: fatal error
CDB: 01 00 00 00 00 00
cdrecord: Operation not permitted. Cannot send SCSI cmd via ioctl.
cdrecord: Operation not permitted. Cannot open or use SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
Running the command as root did work; reading man 7 capabilities
implies that CAP_SYS_ADMIN
grants certain privileged block-device ioctls.
My personal suggestion would be to add a CAP_SYS_ADMIN
file capability to the cdrecord
binary, and make it executable only by the cdrom
group.
Still doesn't work in Nixos Small Unstable; running it as root (gksu k3b) works.
nixos-version
, Ubuntu/Fedora: lsb_release -a
, ...)18.03pre118346.5f8bbb96f8 (Impala)
nix-env --version
)nix-env (Nix) 1.11.15
nix-instantiate --eval "<nixpkgs>" -A lib.nixpkgsVersion
)"18.03pre118346.5f8bbb96f8"
grep build-use-sandbox /etc/nix/nix.conf
)build-use-sandbox = false
I managed to burn a blu-ray with 17.09.2138.48bf1f43cd (Hummingbird) with K3b without using root. K3b showed an error at the end of the burning process (99% done) but the disc seemed perfectly readable by other computers. I think I've had the same issue before NixOS with K3b on other Linux distros too.
Well, this was weird: After successfully writing two discs, I got the permission error on one project which tried to write multiple files to a blu-ray. When I removed all but one file, the disc wrote ok (see my previous comment). I didn't start debugging whether the issue was the number of files (greater than one), the total size of files (although well below maximum capacity), the file types or something else. But anyway it worked with one file with size around 25-35GB but not with three files totalling to size around 45GB (capacity ~50GB). Anyway, just thought I'd share if this helps someone else.
k3b
package doesn't have K3bsetup
executable anymore:
$ ls $(nix-build '<nixpkgs>' -A k3b --no-out-link)/bin
k3b
It also seems to work for me now. Could someone else try it out?
I'm in the cdrom group but it's still not working for me
Hi, I'm suffering from the same problem (using NixOS 18.03). I discovered that k3b used to use cdrkit instead of cdrtools ( https://github.com/NixOS/nixpkgs/issues/6002 ), but it was -- possibly inadvertently -- changed with this commit: https://github.com/NixOS/nixpkgs/commit/e690c3a8dd566651f5fa237bb6cb1d3166450b50 . I replaced cdrtools with cdrkit in the k3b wrapper script by hand, which fixed the problem on my machine.
Maybe it suffices to replace cdrtools with cdrkit in the k3b build recipe to fix this?
By the way, I also played around with the cdrom group, but it's apparently not needed: Users seem to gain r/w-access to optical drives simply by logging in.
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
@jagajaga is this still open?
Still doesn't work for me.
Still doesn't work for me.
Neither for me.
OK, It seems that remounting the /nix/store to rw mode (mount -o remount,rw /nix/store
) and changing the program permissions in K3b (Settings -> Configure k3b -> programs -> Permissions "tab") fixes the problem. I guess it would be preferable if nix did this during the installation of k3b...
@nezumi1503 That's strange. Do you know whether K3b changes anything in the store? (That would be bad.) And what permissions do you need to change?
@turion No, what I tried to say is that the only way to make k3b function is to let it adjust the permissions of cdrdao
, cdrecord
and growisofs
because those are not set correctly during the installation time. That is done in the setting dialogue below. The screenshot is after allowing the program to change the permission in the nix store. I agree it should not be the way to fix it but I do not know what the best way would be because the three programs even did not belong to cdrom group when they were installed.
I'm not keen on how all this policy kit stuff works; but could this be related to #29048?
I marked this as stale due to inactivity. → More info
OK, It seems that remounting the /nix/store to rw mode (
mount -o remount,rw /nix/store
) and changing the program permissions in K3b (Settings -> Configure k3b -> programs -> Permissions "tab") fixes the problem. I guess it would be preferable if nix did this during the installation of k3b...
There is also security.wrappers module option for a non-hacky setcap solution
I marked this as stale due to inactivity. → More info
Still broken...
@ngiger when selecting the cdrecord's security wrapper (with the setuid bit set) in k3b configuration it complains:
cdrecord <= 2.01.01a05 will be run with root privileges on kernel >= 2.6.8
Since Linux kernel 2.6.8 cdrecord <= 2.01.01a05 will not work when run suid root for security reasons anymore.
Solution: Click "Configure K3b..." to solve this problem.
But it still works, right?
yeah it does
I opened #214363 to address that warning.
Still broken
❯ cdrecord -v -dao speed=4 dev=/dev/sr0 ./Downloads/test.iso
TOC Type: 1 = CD-ROM
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
wodim: Cannot allocate memory.
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.
❯ ls -la /dev/sr0
brw-rw----+ root cdrom 0 B Thu Jun 29 22:48:24 2023 ﰩ /dev/sr0
❯ groups
users wheel disk audio cdrom video networkmanager libvirtd docker input kvm render corectrl adbusers
latest nixpkgs-unstable, still broken
https://github.com/NixOS/nixpkgs/issues/19154#issuecomment-1613854089
Same for me. It shredded a bunch of discs already 😔
k3b is still broken, which sucks because brasero won't recognise any of the discs in my drive. my quick and dirty fix was to run it via sudo k3b
in the commandline
really hoping this issue is solved soon!
Chiming in to say that k3b still seems to be broken by default. It works if I run K3b as root, but that's far from ideal.
Issue description
Hello! I'm trying to write files to a CD and getting error:
Running K3bsetup results in
/home/foobar/.nix-profile/bin/k3bsetup: line 16: kcmshell4: command not found
.For example 1 month ago k3b worked 100%.
Steps to reproduce
nix-env -i k3b
Technical details
17.03pre92039.adfcc2d
)cc @ttuegel