toddalancox
Forum Replies Created
-
Forum: Localhost Installs
In reply to: Unable to Update WordPress@mbrost I am unfortunately not an expert with SELinux. I suppose there are always security concerns with anything we do these days.
Still, in any system I have seen, the apache/httpd process had full control over the /www/html or equivalent directory hierarchy. In my case, I don’t have a WordPress directory beneath /www/html.
You could certainly apply the policy to specific directories within WordPress and test to see what the minimum grant needed is.
Forum: Localhost Installs
In reply to: Unable to Update WordPressI believe I was running into this same problem with CentOs 7. I had recently migrated the site from a Solaris host and this was my first update which failed. I was attempting to update from 4.8.2 to 4.8.3. I eventually tracked down the initial failure to the inability to copy update-core.php during the upgrade process. All permissions were correct.
I finally looked at SELinux as a factor and found that the SELinux context on the files was different:
[root@www includes]# ls -Z /var/www/html/
-rw-rw-r–. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 index.php
-rw-rw-r–. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 license.txt
-rw-rw-r–. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 readme.html
-rw-rw-r–. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 wp-activate.php
drwxrwxr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 wp-admin
-rw-rw-r–. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 wp-blog-header.php
-rw-rw-r–. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 wp-comments-post.php
-rw——-. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 wp-config.php
-rw-rw-r–. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 wp-config-sample.php
drwxrwxr-x. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 wp-content
-rw-rw-r–. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 wp-cron.php
drwxrwxr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 wp-includesI found that I needed to have the http_sys_rw_content_t context on the other files and directories. I changed the context with:
chcon -R --type httpd_sys_rw_content_t /var/www/html/After restarting apache I’m now able to update normally through WordPress.
- This reply was modified 8 years, 6 months ago by toddalancox. Reason: Further clarification