0

I am using CentOS Web Panel (CWP) and Apache as a web server. I have deleted the Apache error_log and recreated one using the command below:

touch error_log

I have successfully created the error_log but it didn't wrote any error to the file. I did some research and found that it might be due to:

  1. wrong user, group
  2. wrong file permission value

For first issue since in am using CWP it uses nobody:nobody for user:group. I have tried giving the permission of 700, 600, 644, 755 and 777 but error_log file is always empty.

The file permission looks like this now:

drwxr-xr-x.  3 root   root      4096 Aug 16 06:25 .
drwxr-xr-x. 16 root   root      4096 Jul 23 01:54 ..
-rw-r--r--.  1 root   root   3071646 Aug 16 13:49 access_log
-rw-r--r--   1 nobody nobody       0 Aug 16 06:25 error_log
-rw-r--r--   1 root   root         5 Aug 16 04:34 httpd.pid
-rw-------   1 root   nobody 1318922 Aug 16 13:49 suphp_log
drwxr-xr-x   2 nobody root      4096 Jul 25 22:30 tmp

If there is anything that I am missing could anyone shade light over it?

techraf
  • 4,163
  • 8
  • 27
  • 44
PaladiN
  • 103
  • 1
  • 3

1 Answers1

0

Owner (user:group) should be root:root, permission 644

-rw-r--r-- 1 root root 3638790 2016-08-16 20:06 /usr/local/apache/logs/error_log

Restart apache after that and it will start to log.

womble
  • 95,029
  • 29
  • 173
  • 228
RonanW.
  • 419
  • 2
  • 6