Fixing file and directory permission.

find /home/*/public_html/* -type f -exec chmod 644 {} \;
find /home/*/public_html/* -type d -exec chmod 755 {} \;

we can specify user by replace * with usename

To fix the permission for all the websites.

for i in `ls /var/cpanel/users` ; do chown -R $i.$i /home/$i/public_html/* ; done
Was this answer helpful? 0 Users Found This Useful (0 Votes)