Apache won't start because of permissions error

Linode Staff


I cannot get apache to start. This is the error I am seeing:

Syntax error on line 524 of /opt/lampp/apache2/conf/httpd.conf: Syntax error on line 524 of /opt/lampp/apache2/conf/httpd.conf: Syntax error on line 524

bash: /etc/rc.d/init.d/httpd: Permission denied

I am running the command as root, so I'm not sure what the issue is.

1 Reply


It sounds to me like the permissions on '/etc/rc.d/init.d/httpd' may be incorrect, but you may get more specific information by checking out line 524 of /opt/lampp/apache2/conf/httpd.conf, as it may be calling something else that references `/etc/rc.d/init.d/httpd', but has a permissions issue. I recommend that you run the command

nano +524 /opt/lampp/apache2/conf/httpd.conf

to view the problematic line in your 'httpd.conf' file and then you should be able to track down the issue from there. You can verify permissions on a file by running the command

ls -l </path/to/file>

where '' is the path to the file who's permissions you wish to verify. For example, if you wish to verify '/etc/rc.d/init.d/httpd' you would run

ls -l /etc/rc.d/init.d/httpd

This will give you the exact permission, as well as group and ownership settings for that file. If this does not get you pointed in the right direction, please update this post and we'll be happy to help out in any way that we can!

Tom D.
Linode Support Team


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct