apache2: Saves files on /tmp in a 'system-private-[hash]' instead of just saving folders as defined in the code
That is a systemd security setting that creates a service specific private temp directory.
Your apache systemd unit will file have a setting:
...
[Service]
ExecStart=...
PrivateTmp=yes
...
This option will ensure that the /tmp
directory the service will see is private and isolated from the host system's /tmp
. /tmp
traditionally has been a shared space for all local services and users. Over the years it has been a major source of security problems for a multitude of services. Symlink attacks and DoS vulnerabilities due to guessable /tmp
temporary files are common. By isolating the service's /tmp
from the rest of the host, such vulnerabilities become moot.
Source: http://0pointer.de/blog/projects/security.html
You can configure multiple services to share a PrivateTmp
with JoinsNamespaceOf=
which may be desirable to setting PrivateTmp=no