Running WordPress on Red Hat Enterprise 5.2 with the selinux targeted policy enabled

If you run wordpress on Red Hat Enterprise 5.2 with the selinux targeted policy enabled, some of the wordpress features will not work and some wordpress plugins do not operate correctly. After some review of the targeted policy, I made some changes to the permissions of several folders:

  1. I manually created the uploads folder in my wordpress wp-content folder .
     
  2. I changed the ownership of my wordpress directories and subdirectories to be owned by the apache user and apache group. I should have done this from the beginning to be secure and clean. Shame on me :-(

    chown -Rf apache-user:apache-group [mywordpress base folder]

  3. I changed the Selinux security context of the following folders to "httpd_tmp_t": plugins, themes and uploads
    chcon -Rf -t httpd_tmp_t plugins
    chcon -Rf -t httpd_tmp_t themes
    chcon -Rf -t httpd_tmp_t uploads

With these changes I’m able to upload and to run plugin central and save changes to my themes.

As I learn more, I’ll be updating this post.

[ad#ad-4]

Be Sociable, Share!
This entry was posted in wordpress and tagged , , . Bookmark the permalink.