Thursday, June 6, 2013

How to Fix permissions and ownership issues with cpanel

The following commands will fix your ownership and permissions issues in your folders and your files. Replace your_username with cpanel username or your folder name.

chown your_username:your_username /home/your_username/public_html/* -R

for i in `find /home/your_username/public_html/* -type f`; do chmod 644 $i; done
for i in `find /home/your_username/public_html/* -type d`; do chmod 755 $i; done
chmod 755 /home/your_username/public_html/cgi-bin/ -R


chown your_username:your_username /home/your_username/public_html/* -R

Disqus Comments