-2

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).

Peter White
  • 576
  • 1
  • 7
  • 17
  • 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 White 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 White 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 Answers1

3

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

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940