Need our help to fix this issue ? Please buy an hour from us for just 20$ Buy now Or choose any of our Monthly server support plans 

set CHMOD permissions automatically in cPanel

You can set right permission for files by running the following command under public_html

Please make sure to run it inside /home/username/public_html or else it will change the permission of system files.

 

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

 

To fix ownership of all files and folders please run below command

cd /home/cpanelusername
chown username.nobody public_html

and

cd /home/cpanelusername/public_html
chown -R username.username

This will change the permission of all Files to 644 and Folders to 755. These command are to change the permission of existing files.

New files permission should correct when uploading the files. If its not you can run this command under public_html of each user