[systemd-devel] x bits set on /run/systemd/private, any particular reason?

Hoyer, Marko (ADITG/SW2) mhoyer at de.adit-jv.com
Mon Jun 27 07:44:54 UTC 2016


Hi,

Thx for the answer.

>> Either way, +x has no meaning on sockets (only +w matters).

I guess this was the fact I was actually interested in.

Best regards

Marko Hoyer
Software Group II (ADITG/SW2)

Tel. +49 5121 49 6948
From: Mantas Mikulėnas [mailto:grawity at gmail.com]
Sent: Freitag, 24. Juni 2016 18:31
To: Hoyer, Marko (ADITG/SW2)
Cc: systemd Mailing List
Subject: Re: [systemd-devel] x bits set on /run/systemd/private, any particular reason?

On Fri, Jun 24, 2016 at 2:24 PM, Hoyer, Marko (ADITG/SW2) <mhoyer at de.adit-jv.com<mailto:mhoyer at de.adit-jv.com>> wrote:
Hi,

I’m not an expert on Linux access right management but I’m wondering why systemd’s private socket (/run/systemd/private) has the x bits set. Did it happen accidently?

Immediately after bind(), the socket will have all permissions that weren't masked out by the current umask – there doesn't seem to be an equivalent to the mode parameter of open().

The default umask for init is 0; it seems that while systemd does set a more restrictive umask when necessary, it doesn't bother doing so when setting up the private socket, so it ends up having 0777 permissions by default...

Either way, +x has no meaning on sockets (only +w matters). Checking `find /run -type s -ls`, it seems services aren't very consistent whether to keep or remove it for their own sockets...

--
Mantas Mikulėnas <grawity at gmail.com<mailto:grawity at gmail.com>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160627/3ac6fb36/attachment.html>


More information about the systemd-devel mailing list