Bug#1140336: udev: fchownat() of /dev/kvm failed: Operation not permitted - patch for tmpfiles.c and static-nodes-permissions.conf
Viktor Pashaiev
w.paszajew at gmail.com
Wed Oct 7 07:48:57 BST 2026
Package: udev
Followup-For: Bug #1140336
Control: tags 1140336 + patch
Hi Benjamin,
I ran into the same issue with sbuild --unshare and /dev/kvm bind-mounted.
The failure is caused by dh_installtmpfiles in debhelper 14 removing the '|| true' fallback from the udev.postinst snippet. When setting permissions on static device nodes in unprivileged namespaces, fchownat() returns EPERM and systemd-tmpfiles aborts with exit code 73.
Attached is a patch that:
1. Treats ERRNO_IS_PRIVILEGE (EPERM, EACCES) as non-fatal debug in fd_set_perms() on character and block devices.
2. Changes the action prefix from 'z' to 'z-' in static-nodes-permissions.conf.in so permission errors are tolerated on static device nodes.
Also tracked in Ubuntu LP: #2160036:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2160036
--
Viktor Pashaiev
<w.paszajew at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lp2160036-tmpfiles-gracefully-handle-EPERM-on-device-nodes.patch
Type: text/x-diff
Size: 5403 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20261007/88562274/attachment.patch>
More information about the Pkg-systemd-maintainers
mailing list