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'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
3  
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

 
discard

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

Browse other questions tagged or ask your own question.