We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


File Permision for PHP errors log

lp0411 asked
Medium Priority
Last Modified: 2013-12-15
I have a server hosted by rackspace cloud and I'm trying to get it set up for my web site.  I was trying to capture my php error messages in a log file but I've had to give write access to the world in order to get it to work.  I don't want to give write access to the world for my log file.  How do I make it so it is set up only for root and still have apache able to write to it?
Watch Question

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

You can use ACLs

Please issue the following command:

chmod 770 /log/file/name
setfacl -m u:apache:rwx /log/file/name

If the Apache user is name is httpd, please issue this

setfacl -m u:httpd:rwx /log/file/name

Second way is to give the file apache group so you would access through group apache.

1. Become root
2. chgrp apache /log/file/name
3. chmod 770 /log/file/name

What is the group of apache?  Is it apache or httpd
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.