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

I've got other users on my linux system - how can I 'share' the system's error_log so its readable by other users on the system?

share|improve this question

1 Answer 1

If there is no harm in making the apache error log readable by all others on your system you

  1. chmod o+r /var/log/apache2/error.log
  2. Edit /etc/logrotate.d/apache2 and look for or add a line that says create 640 root adm and change that also to something appropriate like create 644 root adm.

It would be less secure to put everyone in the group of the apache daemon (say www-data). A better option would be to use ACL's (see man setfacl) and allow very specific access to the file.

(Paths are on a Ubuntu/Debian system).

share|improve this answer
    
I dont seem to have an 'apache2' root@vps [/etc/logrotate.d]# ls -al total 40 drwxr-xr-x 2 root root 4096 Mar 11 19:19 . drwxr-xr-x 61 root root 4096 Mar 12 12:52 .. -rw-r--r-- 1 root root 167 Aug 30 2010 httpd -rw-r--r-- 1 root root 223 Mar 4 2004 lircd -rw-r----- 1 root named 163 Jan 20 2010 named -rw-r--r-- 1 root root 61 Sep 8 2010 rpm -rw-r--r-- 1 root root 232 Sep 15 2010 samba -rw-r--r-- 1 root root 154 May 25 2010 snmpd -rw-r--r-- 1 root root 306 Apr 3 2010 syslog -rw-r--r-- 1 root root 100 Apr 4 2010 yum –  siliconpi May 3 '11 at 9:38
    
root@vps [/etc/logrotate.d]# find / -name 'apache2' root@vps [/etc/logrotate.d]# –  siliconpi May 3 '11 at 9:38
    
Just try to find out if your apache logfiles are log-rotated. If no special file exists, maybe there's a line in /etc/logrotate.conf. This is just to make sure a daily logrotation does not re-set your changed file permissions. If there's no rotation, simply ignore this hint. Btw - what linux are you using? –  initall May 3 '11 at 9:54
    
centos/redhat i think –  siliconpi May 6 '11 at 13:10

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.