hunner/puppet-wordpress

SELinux rights changed every time puppet runs

Opened this issue · 0 comments

I am on Centos 6.6 and installing to a non default location (instead of /opt/wordpress or /var/www/html installing to something like /apps/web/www/html)

Everything installs fine but when it checks/changes permissions for the install folder, wp_config.php, and wp-keysalts.php it resets the selinux rights, and apache can no longer view the directory or files. You get a 403 forbidden. For apache to be able to view directory and contents you either have to disable selinux (which I can do, but would rather not) or add httpd_sys_content_t to the rights.

Here is the output from the run, it does this everytime puppet runs if i change the selinux perms.

Notice: Scope(Wordpress::Instance::App[/apps/web/www/html]): Warning: cannot manage the permissions of /apps/web/www/html, as another resource (perhaps apache::vhost?) is managing it.

Notice: /File[/apps/web/www/html]/seltype: seltype changed 'httpd_sys_content_t' to 'default_t'
Notice: /File[/apps/web/www/html/wp-keysalts.php]/seltype: seltype changed 'httpd_sys_content_t' to 'default_t'
Notice: /File[/apps/web/www/html/wp-config.php]/seltype: seltype changed 'httpd_sys_content_t' to 'default_t'

This is probably something im doing wrong on my end but for the life of me cant see what it is.