Changing Group and Owner on Cent OS 7 for /var/www/html

Changing Group and Owner on Cent OS 7 for /var/www/html

Often you see that you are presented with FTP screen while updating Plugin or find following happen when you try to update a plugin

screen74

Here are couple of tested command that do the magic

sudo chown -R apache:apache /var/www/html/
sudo find /var/www/html/ -type d -exec chmod 775 {} \;
sudo find /var/www/html/ -type f -exec chmod 664 {} \;
sudo chcon -R -t httpd_sys_content_t /var/www/html
sudo chcon -R -t httpd_sys_rw_content_t /var/www/html

screen75

Leave a Reply

Your email address will not be published. Required fields are marked *