Writable Files and Configuration Directories

Permalink 2 users found helpful
Hello,

I am trying to install C5 on RHEL7.
All went well except the Writable Files and Configuration Directories test.

I have given full permissions to user apache for the related folders (/config,/files, /packages, /updates)

However the test still reports that there is a problem.

Would appreciate your support.

Thanks in advance,
Demetris

1 Attachment

 
nonsensor replied on at Permalink Reply
I'm having this exact issue with 5.7b. My server is a Mac. Just in case it was checking places that weren't mentioned (beta and all...), I went ahead and 777'd the whole thing. No love.

Thanks to anyone who can help!
demetris replied on at Permalink Reply
Hello nonsensor,

I did the same thing (777 to the whole thing) without any luck. What user is running your apache?
demetris replied on at Permalink Best Answer Reply
Hello guys, i have resolved this issue by disabling seLinux!
AnFr replied on at Permalink Reply
For Fedora 20:
1.) getsebool -a | grep httpd
2.) setsebool allow_httpd_anon_write on
3.) restart of system (maybe)
3.) for each folder:
a.) semanage fcontext -a -t public_content_rw_t /var/www/html/application/config
b.) restorecon -R -v /var/www/html/application/config
c.) ls -Z /var/www/html/application
drwxrwxrwx. root apache unconfined_u:object_r:public_content_rw_t:s0 config
drwxr-xr-x. root root unconfined_u:object_r:httpd_sys_content_t:s0 controllers
drwxr-xr-x. root root unconfined_u:object_r:httpd_sys_content_t:s0 elements
drwxrwxrwx. root apache unconfined_u:object_r:public_content_rw_t:s0 files
minotaur7879 replied on at Permalink Reply
This caused me a headache too, so i hope my details will help someone else.
I resolved this by simply disabling SELinux. Below i showed how to do this temporarily first to test (note: you will have to change it here /etc/selinux/config to make it persistent on reboot.) .

Below is the command to check if SELinux is enabled (enforcing), then temporary method to disable SELinux (permissive) :
[root@ /]# getenforce
Enforcing
[root@ /]# setenforce 0
[root@ /]# getenforce
Permissive

I'm always hesitant to chmod a directory to 777, since this means the files are globally readable, writable and executable. 775 is working for me (technical I set directories only, to 2775). It works given the file ownership is correct, i.e. apache user is running the httpd service, then apache needs to be the group owner.