#!/bin/bash # Reset the directory permissions. chmod 755 /opt/suphp find /opt/suphp -type d -exec chmod 755 {} \; # Reset permission,ownership for cPanel user for user in `/bin/ls /var/cpanel/users`; do chown -R ${user}:${user} /home/${user}/public_html chmod 755 /home/${user}/public_html find /home/${user}/public_html -type f -exec chmod 644 {} \; find /home/${user}/public_html -type d -exec chmod 755 {} \; # Remove php_values in the .htaccess file. find /home/${user}/public_html -name '.htaccess' -exec sed -ie 's/php_value/#php_value/' {} \; find /home/${user}/public_html -name '.htaccess' -exec sed -ie 's/php_flag/#php_flag/' {} \; done