LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Failed at step EXEC spawning /usr/local/apache2/bin/apachectl: Permission denied while starting httpd using command "systemctl start httpd" (https://www.linuxquestions.org/questions/linux-server-73/failed-at-step-exec-spawning-usr-local-apache2-bin-apachectl-permission-denied-while-starting-httpd-using-command-systemctl-start-httpd-4175656541/)

linuxtale 06-28-2019 05:50 AM

Failed at step EXEC spawning /usr/local/apache2/bin/apachectl: Permission denied while starting httpd using command "systemctl start httpd"
 
I'm trying to compile and install httpd 2.4. I tried first using a different website, encountered the below permission denial, uninstalled httpd and tried installation using a different website given below but encountered the same error

https://www.rudraraj.net/how-to-inst...e-in-centos-7/

Code:

[root@c extra]# systemctl start httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@c extra]# journalctl -xe
-- The leading process of the session is 8920.
Jun 28 08:28:37 c.training.com sshd[8920]: pam_unix(sshd:session): session opened for user root by (uid=0)
Jun 28 08:36:24 c.training.com sshd[8946]: Invalid user applmgr from 40.124.4.131 port 45588
Jun 28 08:36:24 c.training.com sshd[8946]: input_userauth_request: invalid user applmgr [preauth]
Jun 28 08:36:24 c.training.com sshd[8946]: pam_unix(sshd:auth): check pass; user unknown
Jun 28 08:36:24 c.training.com sshd[8946]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=40.124.4.131
Jun 28 08:36:26 c.training.com sshd[8946]: Failed password for invalid user applmgr from 40.124.4.131 port 45588 ssh2
Jun 28 08:36:26 c.training.com sshd[8946]: Received disconnect from 40.124.4.131 port 45588:11: Normal Shutdown, Thank you for playing [preauth]
Jun 28 08:36:26 c.training.com sshd[8946]: Disconnected from 40.124.4.131 port 45588 [preauth]
Jun 28 08:46:53 c.training.com sshd[8950]: Invalid user gopher from 206.189.131.213 port 42762
Jun 28 08:46:53 c.training.com sshd[8950]: input_userauth_request: invalid user gopher [preauth]
Jun 28 08:46:53 c.training.com sshd[8950]: pam_unix(sshd:auth): check pass; user unknown
Jun 28 08:46:53 c.training.com sshd[8950]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=206.189.131.213
Jun 28 08:46:55 c.training.com sshd[8950]: Failed password for invalid user gopher from 206.189.131.213 port 42762 ssh2
Jun 28 08:46:55 c.training.com sshd[8950]: Received disconnect from 206.189.131.213 port 42762:11: Normal Shutdown, Thank you for playing [preauth]
Jun 28 08:46:55 c.training.com sshd[8950]: Disconnected from 206.189.131.213 port 42762 [preauth]
Jun 28 08:59:29 c.training.com polkitd[1999]: Registered Authentication Agent for unix-process:9262:7794344 (system bus name :1.92 [/usr/bin/pkttyagent --notify-f
Jun 28 08:59:29 c.training.com systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Jun 28 08:59:29 c.training.com systemd[9268]: Failed at step EXEC spawning /usr/local/apache2/bin/apachectl: Permission denied
-- Subject: Process /usr/local/apache2/bin/apachectl could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /usr/local/apache2/bin/apachectl could not be executed and failed.
--
-- The error number returned by this process is 13.
Jun 28 08:59:29 c.training.com systemd[1]: httpd.service: control process exited, code=exited status=203
Jun 28 08:59:29 c.training.com systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Jun 28 08:59:29 c.training.com systemd[1]: Unit httpd.service entered failed state.
Jun 28 08:59:29 c.training.com systemd[1]: httpd.service failed.
Jun 28 08:59:29 c.training.com polkitd[1999]: Unregistered Authentication Agent for unix-process:9262:7794344 (system bus name :1.92, object path /org/freedesktop

can somebody help me on what to do with this permission denial? i used chmod,chown etc

Code:

[root@c ~]# ll /usr/local/apache2/bin/apachectl
total 0
-rwxrwxrwx. 1 root root 0 Jun 27 10:17 test.txt

would that SELinux "dot" near the permissions cause the denial?

scasey 06-28-2019 03:18 PM

Not sure what the problem is, but I have to ask, why are you trying to install from source?

The Best Practice is to install from the repositories.
Code:

yum install httpd

linuxtale 06-28-2019 10:17 PM

Quote:

Originally Posted by scasey (Post 6010084)
Not sure what the problem is, but I have to ask, why are you trying to install from source?

The Best Practice is to install from the repositories.
Code:

yum install httpd

I'm new to linux and undergoing training. Here I'm trying to install customized apache from source code instead of installing directly from the repository.

scasey 06-29-2019 12:00 PM

Quote:

Originally Posted by linuxtale (Post 6010175)
I'm new to linux and undergoing training. Here I'm trying to install customized apache from source code instead of installing directly from the repository.

Your server, of course.
I've been administering apache for about 20 years, and I've never needed (or wanted) to install it from source. Other things, yes...but not apache.

I've given all the help I know. Sorry.

linuxtale 06-29-2019 09:39 PM

Quote:

Originally Posted by scasey (Post 6010323)
Your server, of course.
I've been administering apache for about 20 years, and I've never needed (or wanted) to install it from source. Other things, yes...but not apache.

I've given all the help I know. Sorry.

Sorry, because of my inexperience I'm unaware how relevant is the installation from source code. Since I'm given a task and I got stuck with the "permission denied" error for a file even though I'm logged in as root user made me curious and decided to discuss on this forum. Thank you for quick your reply


All times are GMT -5. The time now is 03:20 PM.