Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I run Awstats via a web browser and click "Update now" it reports:

Error: Couldn't open server log file "/var/log/httpd/domains/domain.net.log" : Permission denied

Setup ('/etc/awstats/awstats.domain.net.conf' file, web server or permissions) may be wrong.

File permissions:

# ls - la /var/log/httpd/domains/snowweb.net.log 
-rwxrwxrwx 1 root root 68K Jul 22 18:29 /var/log/httpd/domains/domain.net.log

Server is CentOS 5.9 and does not 'seem' to have selinux enabled (appears to be installed but .conf file missing and selinuxenabled returns nothing).

share|improve this question
3  
Did you check the permissions of all of the containing directories? –  Michael Hampton Jul 22 '13 at 11:22
    
Your suggesting did the trick @MichaelHampton. Perhaps you'd like to make it into an answer, so I can accept it? The problem was the httpd directory, which was 700. I changed it to 777 & added +x. Might try to tighted it up a little now though. Thanks. –  Peter Snow Jul 22 '13 at 11:29
7  
@PeterSnow That's the WORST thing you can do. That's the school example of how to make stuff insecure as much as possible. –  Lucas Kauffman Jul 22 '13 at 11:41
    
First @Lucus, as I made clear, this was a diagnostic move, not a permanent one. 2nd) this is only permissions to a web log directory and 3rd) I'm the only user on the system, so where was the risk? Might I suggest that instead of trolling, you use your skills to offer advice rather than to judge. –  Peter Snow Jul 22 '13 at 12:02
2  
I'm not trolling, I wasn't judging either, I was just stating that you made a very bad decission. But hey obviously you already think there are no risks involved. You are already making the mistake assuming that your box is completely safe and unbreakable. The moment somebody can execute a command in a minor process or you forget to disable anonymous ftp login you are already completely screwed because it will be trivial to leverage permissions and get complete access to your webserver. –  Lucas Kauffman Jul 22 '13 at 12:13

1 Answer 1

up vote 3 down vote accepted

Did you check the permissions of all of the containing directories? One of those is likely where the trouble lies.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.