This is my first time installing Drupal on CentOS. I know for Ubuntu it needs to be
www-data as the /files folder owner, but what is it for CentOS?
From the command line, you can edit the /etc/sysconfig/selinux file. This file is a symlink to /etc/selinux/config. The configuration file is self-explanatory. Changing the value of SELINUX or SELINUXTYPE changes the state of SELinux and the name of the policy to be used the next time the system boots.
[root@host2a ~]# cat /etc/sysconfig/selinux # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=permissive # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted # SETLOCALDEFS= Check local definition changes SETLOCALDEFS=0
Change it from
Once you have saved the changes
sudo shutdown -r now to restart now.
Also you can disable it temporary ( until next restarting ) with
sudo setenforce 0
In CentOS, Apache/HTTPD username is normally
apache. During installation,
apache user should have read-write access to
apache user should have read-write access to the
sites/default/files directory. Check Drupal Docs for more details on file permissions.