5
2
Fork
You've already forked seedfiles
3

"C" should preserve ownership #23

Closed
opened 2026年06月02日 01:03:47 +02:00 by patteone · 4 comments
Contributor
Copy link

This is like #12 but about ownership information. This is one of the last remaining issues with the packages in Debian which ship files in /usr/lib/tmpfiles.d. Of all files that do, here is a list of all C-type lines:

C /etc/varnish/secret 600 - - - /proc/sys/kernel/random/uuid
C /run/cockpit/inactive.issue 0640 root sudo - /usr/share/cockpit/issue/inactive.issue
C /run/softflowd/chroot/etc/protocols - - - - /etc/protocols
C /srv/ftp/welcome.msg - - - - /usr/share/proftpd/templates/welcome.msg
C /var/lib/canna/dic/canna/bushu.cld - canna canna - /usr/lib/canna/debian-template/bushu.cld
C /var/lib/canna/dic/canna/fuzokugo.cbd - canna canna - /usr/lib/canna/debian-template/fuzokugo.cbd
C /var/lib/canna/dic/canna/iroha.cbd - canna canna - /usr/lib/canna/debian-template/iroha.cbd
C /var/lib/canna/dic/canna/iroha.cld - canna canna - /usr/lib/canna/debian-template/iroha.cld
C /var/lib/jetty9/webapps/root - - - - /usr/share/jetty9/default-root

Of those 9, 5 explicitly set the ownership information and that works fine. Of the remaining 4, 3 copy from a file which is owned by user and group root, so seedfiles which is run as root is creating the files with the correct owner by coincidence. Only the first line which copies from /proc/sys/kernel/random/uuid fails in my testcases. That file is owned by user and group "nobody" and systemd-tmpfiles preserves this information while seedfiles creates /etc/varnish/secret owned by the root user.

This is like #12 but about ownership information. This is one of the last remaining issues with the packages in Debian which ship files in /usr/lib/tmpfiles.d. Of all files that do, here is a list of all C-type lines: ``` C /etc/varnish/secret 600 - - - /proc/sys/kernel/random/uuid C /run/cockpit/inactive.issue 0640 root sudo - /usr/share/cockpit/issue/inactive.issue C /run/softflowd/chroot/etc/protocols - - - - /etc/protocols C /srv/ftp/welcome.msg - - - - /usr/share/proftpd/templates/welcome.msg C /var/lib/canna/dic/canna/bushu.cld - canna canna - /usr/lib/canna/debian-template/bushu.cld C /var/lib/canna/dic/canna/fuzokugo.cbd - canna canna - /usr/lib/canna/debian-template/fuzokugo.cbd C /var/lib/canna/dic/canna/iroha.cbd - canna canna - /usr/lib/canna/debian-template/iroha.cbd C /var/lib/canna/dic/canna/iroha.cld - canna canna - /usr/lib/canna/debian-template/iroha.cld C /var/lib/jetty9/webapps/root - - - - /usr/share/jetty9/default-root ``` Of those 9, 5 explicitly set the ownership information and that works fine. Of the remaining 4, 3 copy from a file which is owned by user and group root, so seedfiles which is run as root is creating the files with the correct owner by coincidence. Only the first line which copies from `/proc/sys/kernel/random/uuid` fails in my testcases. That file is owned by user and group "nobody" and systemd-tmpfiles preserves this information while seedfiles creates `/etc/varnish/secret` owned by the root user.

Oh yeah that sounds like a bug actually, it should definitely preserve them

Oh yeah that sounds like a bug actually, it should definitely preserve them

Yep, had some missing logic
Fixed and added a test with 09e6e1a
Thanks!

Yep, had some missing logic Fixed and added a test with 09e6e1a Thanks!

Also pushed a new tag 1.5.2, figured you want to ship this on debian as soon as possible

Also pushed a new tag 1.5.2, figured you want to ship this on debian as soon as possible
Author
Contributor
Copy link

What a service, incredible! Thank you! 💜

What a service, incredible! Thank you! 💜
Sign in to join this conversation.
No Branch/Tag specified
main
feat/selinux
v1.7.1
v1.7
v1.6
v1.5.2
v1.5.1
v1.5
v1.4.2
v1.4.1
v1.4
v1.3
v1.2
v1.1
v1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Gardenhouse/seedfiles#23
Reference in a new issue
Gardenhouse/seedfiles
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?