This simple script fixes cPanel permissions for all accounts (server-wide) or per account. It will be useful when we encounter wrong permissions or ownership while troubleshooting issues or after a manual migration.
These are the steps to fix cPanel permissions server-wide or per account:
- Download the script from the git account
cd /usr/src/ && wget https://github.com/iamfasal/cPScripts/raw/refs/heads/main/cPanel-fixperms.sh
- Make the script executable
chmod +x /usr/src/cPanel-fixperms.sh
- Run the script as follows when needed
/usr/src/cPanel-fixperms.sh all # To run server wide
/usr/src/cPanel-fixperms.sh USER # Replace USER with the actual user to run per account
You may also find similar scripts on this website here, and feel free to comment with your feedback.


Nice post. I learn something new and challenging on blogs I stumbleupon every day. Its always interesting to read content from other writers and use something from other web sites.