Fixing Permissions

Fixing permissions of Files and Folders in an account can be a helpful step in troubleshooting a web error of your own, or someone else’s support request. Reclaim Hosting has Apache software on all servers, both Shared Hosting and Domain of One’s Own, to run behind the scenes and handle all content on the server. The software’s job is to accept requests from clients and then send responses to those requests. Apache receives a URL, translates it into a program or file name, executes it, and then sends it back to the requester. If Apache can’t complete this process, it throws an error (discussed in depth in other posts).

Sometimes permissions to handle these requests may be set too openly, which can also cause Apache to send an error to the user. All Reclaim users technically are permitted to reset their own permissions, as Reclaim servers have a shell script located at /root/fixperms.sh– this will fix permissions in the cPanel automatically (this includes all directories, not just public_html). To fix permissions on a specific account, run the following command:

sh fixperms.sh -a cpaneluser

^Make sure to replace cpaneluser with the cPanel username of the account you’d like to fix.

If you’re only really needing to fix permissions on a single directory, not the full cPanel account, navigate to the top folder in terminal and run the following commands:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

^Please note that these commands should never be used at the root of an account, but always in public_html subfolders.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top