Magento Patches and SELinux

November 10, 2015

After applying patches to Magento running on CentOS (or RHEL), make sure to run the following to restore functionality.

I don’t run this on the entire root folder of magento, to avoid ‘var/cache’ and other miscellaneous folders. Add ‘n’ switch (e.g. -rvn) to do a dry-run test only.

sudo restorecon -rv /var/www/html/magento/app
sudo restorecon -rv /var/www/html/magento/lib
sudo restorecon -rv /var/www/html/magento/downloader
sudo restorecon -rv /var/www/html/magento/errors
sudo restorecon -rv /var/www/html/magento/includes
sudo restorecon -rv /var/www/html/magento/js