Set SELinux To Permissive Mode on CentOS 7

ownCloud 7 on my CentOS 7 VM kept on complaining that I don’t have access to the config directory. On contrary I had both /var/www/html/owncloud/config and /var/www/html/owncloud/data directory set to drwxrwxrwx. and drwxr-x---. respectively. Yet the server complained about not having access to the config directory. Here comes the SELinux part. SELinux is by default set to enforce which we want to set to permissive more. It would be better if you create an exception rather than setting it to permissive mode but for now here is how you set up it to permissive mode.

setenforce 0

You can check the status of SELinux by running sestatus command.

sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28