0

Apache service cannot start and I know the reason but not sure how to fix it:

Apache error:

 apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Tue 2020-06-02 15:32:34 UTC; 3s ago
  Process: 1918 ExecStop=/usr/sbin/apachectl stop (code=exited, status=226/NAMESPACE)
  Process: 2028 ExecStart=/usr/sbin/apachectl start (code=exited, status=226/NAMESPACE)
 Main PID: 1609 (code=exited, status=0/SUCCESS)

Jun 02 15:32:34 ip-172-26-6-28 systemd[1]: Starting The Apache HTTP Server...
Jun 02 15:32:34 ip-172-26-6-28 systemd[2028]: apache2.service: Failed to set up mount namespacing: No such file or
Jun 02 15:32:34 ip-172-26-6-28 systemd[2028]: apache2.service: Failed at step NAMESPACE spawning /usr/sbin/apachect
Jun 02 15:32:34 ip-172-26-6-28 systemd[1]: apache2.service: Control process exited, code=exited status=226
Jun 02 15:32:34 ip-172-26-6-28 systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 02 15:32:34 ip-172-26-6-28 systemd[1]: Failed to start The Apache HTTP Server.

The error appeared when I created a symbolic link from /var/tmp to /tmp:

sudo mv /var/tmp /var/tmpold
sudo ln -s /tmp /var/tmp
sudo cp -prf /var/tmpold/* /tmp/
sudo rm -rf /var/tmpold/

The issue occurs because apache tries to mount it's private dependencies in the /var/tmp but cannot do it because of the symbolic link.

The private dependencies are governed by this setting in apache2.conf file:

PrivateTmp=true

If I set PrivateTmp=false, apache starts without any issues.

The question is, how can I keep the PrivateTmp to true and still mount the private dependencies either in /var/tmp or /tmp folders?

Any suggestion will be appreciated!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.