Working with SELinux
cat /var/log/audit/audit.log
To add one file as accessible via HTTPD
sudo chcon -t httpd_user_content_t /tmp/system_snapshot.dat
Other permission (write, execute) are as follow
httpd_sys_content_t (system content (var/www) read only to apache)
httpd_sys_content_rw_t (system content (var/www) read write to apache)
httpd_sys_script_exec_t (system content (var/www) executable by apache)
httpd_user_content_t (user content ($HOME/public_html) read only to apache)
httpd_user_content_rw_t (user content ($HOME/public_html) read write to apache)
httpd_user_script_exec_t (user content ($HOME/public_html) executable by apache)
To execute one script
apache wants to execute /var/www/webapp/webapp.php
semanage fcontext -a -t httpd_sys_script_exec_t /var/www/webapp/webapp.php
restorecon -R -v /var/www/webapp/webapp.php
Recent Comments