Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a big problem with Apache and ACL. I have two servers, both running CentOS 6.3, but the first one is running CPanel/WHM and the second one is just Apache, ACL and Samba for local sharing.

In the first box (the one with CPanel), I have a folder called /test and the owner of this folder is abc. My Apache is running as user nobody. If I try to create a directory or file (using PHP, for example), I can't. If I add the user nobody to the ACL list (setfacl -Rm u:nobody:rwx /test), now I can write to this folder, even if owner is still abc.

The same scenario doesn't work on second box, with standard Apache (not compiled by CPanel), and I can't figure out why. I have my filesystem mounted with ACL on both machines. I'm using ACL with Samba in the second box without any problem, so it's not an ACL problem itself.

If I change the owner of /test to nobody, now I can modify that directory with PHP scripts. I just can't use ACL on that second box.

share|improve this question
Does the second one have apparmor or selinux or some other alternate security system? – DerfK Oct 5 '12 at 22:56
+1 CentOS has SELinux out of the box which if enabled [getsestatus] will stop httpd from writing to anything outside of /var/www unless you change the context of the directories. [semanage fcontext -a -t httpd_sys_content_t "/test(/.*)?"] then [restorecon -Rv /test] – James Yale Oct 9 '12 at 14:51
unfortunately, still not working. SE linux is already disabled. [code][root@teste html]# getenforce Disabled [/code] – Jonis Maurin Ceará Oct 11 '12 at 19:06

Your Answer


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

Browse other questions tagged or ask your own question.