Fix Permissions of Folders and Files

Fix_Permissions_1.png

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 running on all Shared Hosting and Domain of One’s Own servers to 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.

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:

bash fixperms.sh -a cpaneluser

^You'll want to 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 {} \;
Note: These two commands should never be used at the root of an account, but always in public_html subfolders.
Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more
Reclaim Hosting Support Hours
8:00 am - 5:00 pm ET, Monday through Friday
Submit a Ticket
Get a quick and helpful response from the pros.
Need Extra Support?
No problem, we're here to help! Talk to us about Professional Services or custom Service Level Agreements.