root@server:/usr/local/directadmin/custombuild# systemctl start httpd
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
root@server:/usr/local/directadmin/custombuild# systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Tue 2016-01-26 12:16:17 MSK; 10s ago
Process: 14703 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=exited, status=226/NAMESPACE)
Jan 26 12:16:17 server.domain.com systemd[14703]: Failed at step NAMESPACE spawning /usr/sbin/httpd: Permission denied
Jan 26 12:16:17 server.domain.com systemd[1]: httpd.service: control process exited, code=exited status=226
Jan 26 12:16:17 server.domain.com systemd[1]: Failed to kill control group: Invalid argument
Jan 26 12:16:17 server.domain.com systemd[1]: Failed to kill control group: Invalid argument
Jan 26 12:16:17 server.domain.com systemd[1]: Failed to start The Apache HTTP Server.
Jan 26 12:16:17 server.domain.com systemd[1]: Unit httpd.service entered failed state.
/tmp -> /var/tmp
or
/var/tmp -> /tmp
rm -f /var/tmp
mkdir /var/tmp
chmod 1777 /var/tmp
从系统角度来看,不太理想的解决方法是编辑:
/etc/systemd/system/httpd.service
并将这一行:PrivateTmp=true
替换成以下两行:
PrivateTmp=false
NoNewPrivileges=yes
systemctl daemon-reload
然后httpd应该能够启动:
root@server:/etc/systemd/system# systemctl start httpd
root@server:/etc/systemd/system# systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled)
Active: active (running) since Tue 2016-01-26 12:19:04 MSK; 11s ago
Process: 17276 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=exited, status=0/SUCCESS)
Main PID: 17284 (httpd)
CGroup: /lxc/101/system.slice/httpd.service
Jan 26 12:19:04 server.domain.com systemd[1]: Started The Apache HTTP Server.
Jan 26 12:19:14 server.domain.com systemd[1]: Started The Apache HTTP Server.
我们将继续监视其他报告,并会考虑更改默认启动脚本(如果这是常见问题)。








