Fix suPHP permissions

From Wiki
Jump to: navigation, search

This script should change all of the files on each account to the proper permissions so that PHP doesn't error out.


for user in `ls /var/cpanel/users`; do
	chown ${user}:${user} /home/${user}/public_html
	chmod 755 /home/${user}/public_html
	find /home/${user}/public_html -group nobody -print0 | xargs -0 chgrp ${user}
	find /home/${user}/public_html -type f -print0 | xargs -0 chmod 644
	find /home/${user}/public_html -type d -print0 | xargs -0 chmod 755