Fix Permissions of Folders and Files

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.

More to explore

cPanel Basics

cPanel Read below to understand the basics of a cPanel dashboard. By deafult, cPanel will put the Files section first on your dashboard. Note

Changing PHP Version

To change the version of PHP you’ll first navigate to cPanel 3. From there you’ll scroll down to the ‘Software’ section. Click the ‘MultiPHP

Changing Primary Domain

A very common support request we often get is asking for assistance with changing a domain name. More specifically, switching the primary

SEARCH

css.php