[lug] Alternate /tmp in Systemd?

Rob Nagler nagler at bivio.biz
Fri Jun 22 13:53:41 MDT 2018


On Fri, Jun 22, 2018 at 1:36 PM, Davide Del Vento wrote:

> Sure, if you're using a container (or even just a chroot) bind mount is
> what you want instead of symlink. If that would not work and you're still
> seeking suggestions, can you elaborate on the why?
>
>
Systemd creates a container implicitly. Right now, the systemd unit is
running as non-root user.

Here's the workaround I came up with:

ExecStart=/foo/start
User=root
PrivateTmp=true

Then in /foo/start:

mount --bind /tmp /foot/tmp
su non_root_user -c 'real server'

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180622/782b2f14/attachment.html>


More information about the LUG mailing list