Ask Your Question
0

Wordpress can't create files, pages or posts if SElinux is enabled, FS 29

asked 2018-12-31 02:41:14 -0600

Tarik gravatar image

updated 2018-12-31 02:58:24 -0600

Hi,

I did a web server on Cloud Server using Fedora Server 29 + Latest Apache + Latest PHP + Latest MariaDB + latest Wordpress from it's website.

If I disable SELinux the new website works perfect but if I enable it the Wordpress can't create pages or posts, also I can't access the plugins and themes market, is there any way to enable SELinux without problem in Wordpress?

Regards

edit retag flag offensive close merge delete

Comments

We need more information. See https://wiki.centos.org/HowTos/SELinux . Errors, AVC, audit2why .....

Panther gravatar imagePanther ( 2018-12-31 08:00:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-12-31 14:53:18 -0600

aeperezt gravatar image

To make workpress upload files when working with SELinux you need to do this:

chcon -R -t httpd_sys_content_rw_t /var/www/html/your_wordpress_dir/wp-content/uploads/

You should also do this to allow to connect to the db use the network and send emails if you wordpress require it:

sudo setsebool -P httpd_can_network_connect_db 1
sudo setsebool -P httpd_can_network_connect 1
sudo setsebool -P httpd_can_sendmail 1

If you are hosting it on a home folder then there are other steps that need to be done.

Good Luck.

edit flag offensive delete link more

Comments

Thank you very much my dear.

Tarik gravatar imageTarik ( 2019-01-01 10:54:51 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-12-31 02:41:14 -0600

Seen: 44 times

Last updated: Dec 31 '18