Discussion:
Storing sockets in /tmp and systemd's PrivateTmp
Thue Janus Kristensen
2014-12-27 02:15:18 UTC
Permalink
I have a program named rfwadmin[1], which is a web interface for
controlling a MineCraft server. The MineCraft server is started by the init
system from /etc/init.d/minecraft.sh, in a tmux session own by the
webserver user, and the web server can then control the MineCraft server by
send-keys into the tmux session.

This worked fine on Ubuntu, but I had some very confusing tmux problem on
CentOS, with the apache server not being able to see the tmux session
started from /etc/init.d/minecraft.sh .

After some stumbling around, I found out about systemd's PrivateTmp feature
[2], which means that apache couldn't see the tmux socked created in /tmp
from /etc/init.d/minecraft.sh .

I found a solution (manually specifying the socket location somewhere
outside /tmp), but you (tmux maintainers) should consider storing the tmux
server sockets somehow/somewhere else than /tmp IMO.

Regards, Thue

[1] https://github.com/Thue/rfwadmin
[2] http://0pointer.de/blog/projects/security.html
Thomas Adam
2014-12-29 12:15:06 UTC
Permalink
Post by Thue Janus Kristensen
I found a solution (manually specifying the socket location somewhere
outside /tmp), but you (tmux maintainers) should consider storing the tmux
server sockets somehow/somewhere else than /tmp IMO.
It defaults to /tmp if TMPDIR is not set. See also TMUX_TMPDIR. The
default won't change.

-- Thomas Adam

Loading...