On Tuesday 27 February 2018 13:13:34 Don Armstrong wrote:

> On Tue, 27 Feb 2018, Gene Heskett wrote:
> > Just curious Sven. Why was this not supplied as a manpage or
> > something, as far back as wheezy?
>
> It's pretty common knowledge that initscripts and systemd units which
> don't run as root have to create temporary directories in /run to
> track their pid files and sockets before they drop permissions.
>
> > Didn't anyone think of the stuff that runs as a user?
>
> Stuff that runs as a user should use that user's home directory. [I
> have a ~/var/ for this purpose, but other things use environmental
> variables or ~/.something/foopid or similar.]
>
> On Tue, 27 Feb 2018, Gene Heskett wrote:
> > Neither jessie nor stretch have a manpage for systemd.tmpfiles.
>
> It's systemd-tmpfiles(8) and tmpfiles.d(5).
>
> > And how does that work when /run is a link to /var/run? and it
> > doesn't work thru links. Confusing without a lot more study.
>
> It's the other way around. /var/run should be a symlink to /run, which
> is a temporary filesystem which goes away on reboot. [It's this way
> because /var is sometimes a separate filesystem, and pid files need to
> be written at early boot before /var is mounted.]
>
> On Tue, 27 Feb 2018, Gene Heskett wrote:
> > I have no clue why the /log and /run directory's are root only, but
> > its for sure a PITA. And the "genius" who decreed that has yet to
> > surface and offer an explanation.
>
> They're root only because otherwise someone could write 1 to something
> like /run/apache2/apache2.pid and watch as your apache2 init script
> tried to kill off init. Or something more original and evil.

I'll have to admit that thought never crossed my mind, whats left of 
it. :)

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply via email to