Rckzz
Rckzz

Reputation: 29

Creating a named FIFO using systemd-tmpfiles as non-root user

I want to create a named FIFO using systemd-tmpfiles as specified in the manual at tmpfiles.d | p,p+. I am able to create the fifo but the issue is with the user and group of that named fifo. Here is how I am defining it in conf file:

p+ /run/reboot 0644 system system - -

But the fifo is always created as root.root even if I specify it as system system in the conf file.

If I run the systemd-tmpfiles-setup.service script after bootup, then it the fifo is with system.system privileges.

/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev

So, either systemd-tmpfiles is creating it as root.root at bootup or some other service is changing permissions (not systemd-udev-trigger - tried masking this but no change).

For debug purpose, I ran this script (lsing) as ExecStartPort of systemd-tmpfiles-setup.service which does ls -la on /run and writes to /run/lsing.txt. Even there, I see the fifo is root.root,

ExecStartPost=/sbin/lsing

Need some help in debugging this issue. I am quite new to systemd.

Upvotes: 0

Views: 873

Answers (0)

Related Questions