etmpfiles and udev cannot set permissions in /dev/: "Invalid Argument".
Since more than a month now, when
system/etmpfiles starts up the etmpfiles-dev service, it fails at setting permissions of files in /dev/.
A manual run of /etc/init.d/etmpfiles-dev (as root) prints the following to the terminal:
* Setting up tmpfiles.d entries for /dev ...
fchmod() of /dev/fuse failed: Invalid argument
fchmod() of /dev/uinput failed: Invalid argument
fchmod() of /dev/snd/timer failed: Invalid argument
fchmod() of /dev/snd/seq failed: Invalid argument
fchmod() of /dev/rfkill failed: Invalid argument
fchmod() of /dev/loop-control failed: Invalid argument
fchmod() of /dev/net/tun failed: Invalid argument
fchmod() of /dev/vfio/vfio failed: Invalid argument
fchmod() of /dev/kvm failed: Invalid argument
fchmod() of /dev/vhost-net failed: Invalid argument
fchmod() of /dev/vhost-vsock failed: Invalid argument [ !! ]
* ERROR: etmpfiles-dev failed to start
[/tt]
Another way to try to set permissions of files under [tt]/dev/[/tt] is udev. I have an udev rule that wants to set the permissions of [tt]/dev/fuse[/tt] to [tt]0666[/tt]:
[code]
KERNEL=="fuse", GROUP="fuse", MODE="0666"
When I load the fuse kernel module, I observe that in the result /dev/fuse has the correct group ownership but wrong permissions (0600: Readable and writable only by the owner).
Running udevd with debug options prints the following to the terminal when loading the fuse kernel module:
fuse: Device is queued (SEQNUM=12773, ACTION=add)
Cleanup idle workers
Skipping overridden file '/usr/lib/udev/rules.d/99-fuse.rules'.
Skipping overridden file '/usr/lib/udev/rules.d/50-Brother_DSScanner.rules'.
Skipping overridden file '/usr/lib/udev/rules.d/50-qmk.rules'.
Skipping overridden file '/usr/lib/udev/rules.d/99-fuse3.rules'.
Skipping overridden file '/usr/lib/udev/rules.d/99-aw_usb.rules'.
fuse: Device ready for processing (SEQNUM=12773, ACTION=add)
Successfully forked off '(udev-worker)' as PID 22361.
fuse: Worker [22361] is forked for processing SEQNUM=12773.
fuse: Device is queued (SEQNUM=12774, ACTION=add)
Worker [22337] exited.
fuse: Processing device (SEQNUM=12773, ACTION=add)
fuse: Device ready for processing (SEQNUM=12774, ACTION=add)
fuse: Removing watch handle -1.
Successfully forked off '(udev-worker)' as PID 22362.
fuse: /usr/lib/udev/rules.d/50-udev-default.rules:106 MODE 0666
fuse: Worker [22362] is forked for processing SEQNUM=12774.
Worker [22336] exited.
fuse: Processing device (SEQNUM=12774, ACTION=add)
fuse: /etc/udev/rules.d/99-fuse.rules:2 GROUP 500
fuse: /etc/udev/rules.d/99-fuse.rules:2 MODE 0666
fuse: /etc/udev/rules.d/99-fuse3.rules:2 GROUP 500
fuse: /etc/udev/rules.d/99-fuse3.rules:2 MODE 0666
fuse: Setting permissions /dev/fuse, uid=0, gid=500, mode=0666
fuse: Failed to set owner/mode of /dev/fuse to uid=0, gid=500, mode=0666: Invalid argument
fuse: Successfully created symlink '/dev/char/10:229' to '/dev/fuse'
fuse: sd-device: Created empty file '/run/udev/data/c10:229' for '/devices/virtual/misc/fuse'
fuse: Device processed (SEQNUM=12773, ACTION=add)
fuse: sd-device-monitor(worker): Passed 203 byte to netlink monitor.
fuse: Device processed (SEQNUM=12774, ACTION=add)
fuse: sd-device-monitor(worker): Passed 154 byte to netlink monitor.
No events are queued, removing /run/udev/queue.
Note the fuse: Failed to set owner/mode of /dev/fuse to uid=0, gid=500, mode=0666: Invalid argument.
I stumbled upon this since I failed to get /dev/kvm to be group read and writeable, what I want to achieve for QEMU.
System information:
What can be the issue here?, what might block etmpfiles or udev to set the permissions?
A manual chmod 0666 /dev/fuse works without issues.
Regards!