Hey i have a Problem when i start Apache:

code
root@e2dd2500-8b98-4d18-8e6e-de36a748b017:/usr/sbin# systemctl status apache2.service
* apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-08-11 12:43:47 UTC; 4min 18s ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 13158 ExecStart=/usr/sbin/apachectl start (code=exited, status=203/EXEC)

Aug 11 12:43:47 e2dd2500-8b98-4d18-8e6e-de36a748b017 systemd[1]: Starting The Apache HTTP Server...
Aug 11 12:43:47 e2dd2500-8b98-4d18-8e6e-de36a748b017 systemd[13158]: apache2.service: Failed to execute command: Permission denied
Aug 11 12:43:47 e2dd2500-8b98-4d18-8e6e-de36a748b017 systemd[13158]: apache2.service: Failed at step EXEC spawning /usr/sbin/apachectl: Permission denied
Aug 11 12:43:47 e2dd2500-8b98-4d18-8e6e-de36a748b017 systemd[1]: apache2.service: Control process exited, code=exited, status=203/EXEC
Aug 11 12:43:47 e2dd2500-8b98-4d18-8e6e-de36a748b017 systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 11 12:43:47 e2dd2500-8b98-4d18-8e6e-de36a748b017 systemd[1]: Failed to start The Apache HTTP Server.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @tweetgames10,

It seems like you have some wrong ownership/permissions somewhere. Can you confirm how did you install apache2 on your Ubuntu server? Additionally, please confirm if you made any changes to the files in your apache2 directory?

You can start by checking if the actual binnary file has the proper permissions:

ls -lah /usr/sbin/apachectl

It should be something like

lrwxrwxrwx 1 root root 10 Mar 13 12:26 /usr/sbin/apachectl -> apache2ctl

Your next point of failure should be the file apache2ctl again located in the same directory.

-rwxr-xr-x 1 root root 7.1K Jul 16  2019 /usr/sbin/apache2ctl

Next you should turn your attention to /etc/apache2/

Regards,
KFSys

Submit an Answer