[CentOS] File access in Apache 2.4
Peter Eckel
lists at eckel-edv.de
Thu Nov 23 14:03:43 UTC 2017
> official way is to copy the unit file to /etc/systemd/system and edit
> this copy.
that's one way to do it. It has the disadvantage of overriding *all* settings in the vendor-supplied unit files, which may be changed or extended in later releases.
I prefer the other supported way (see <https://www.freedesktop.org/software/systemd/man/systemd.unit.html>):
1. Create a directory named after the unit in /etc/systemd/system, /etc/systemd/system/httpd.service.d/
2. Create an override file within that directory, for instance private-tmp.conf, with the following contents:
[Service]
PrivateTmp=false
3. Run "systemd daemon-reload" and "systemd restart httpd"
You can verify that the override file has been loaded with
> [root at master1 ~]# systemctl status httpd
> ● httpd.service - The Apache HTTP Server
> Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
> Drop-In: /etc/systemd/system/httpd.service.d
> └─private-tmp.conf
This will override only the setting you want to override and still survive updates.
More information about the CentOS
mailing list