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
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
Hello nonsensor,
I did the same thing (777 to the whole thing) without any luck. What user is running your apache?
I did the same thing (777 to the whole thing) without any luck. What user is running your apache?
Hello guys, i have resolved this issue by disabling seLinux!
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
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
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.
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.
Thanks to anyone who can help!