Reset Permissions for directories to 0755 and 0644 on Cpanel

Sometimes, file and folder permissions can get confused, for example, 644 will revert to 664 preventing files from being read by the public.

The SSH commands below will reset the permissions for a users folder so they can be read by the public but with security permissions.

find /home/___USERNAME__/public_html/* -type d -exec chmod 755 {} \;
find /home/___USERNAME__/public_html/* -type f -exec chmod 644 {} \;
  • ssh, cpanel, perms, permissions
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Reset File and Folder Permissions and Ownership for a user account in Cpanel

Use this script to reset the permissions and ownership of files and folders on a Cpanel user...

Named fails to start with "zone 'domain.com': already exists previous definition (Cpanel DNS Only)

This trick allows you to remove duplicated DNS entries on a DNS Only cluster with Cpanel.As you...

What is the difference between Jailed Shell and Normal Shell?

You are reading this article because you have been granted shell access on our servers and want...