CHMOD, an acronym for “Change Mode,” is a command used in UNIX and UNIX-like operating systems to manage the permissions of files and directories. These permissions control who can read, write, or execute (run as a program) the files or directories on your hosting account.
You may want to modify your file permissions and this guide will show you how.
Step 1: Log into your cPanel account
Begin by logging into your cPanel account.
Step 2: Navigate to the File Manager
Once you’re logged in, look for the “Files” section in your cPanel home dashboard. Here, click on the “File Manager” icon.
Step 3: Access the Directory
In the File Manager, you’ll see a list of all your website’s files and directories. Navigate through your files to find the specific file or folder for which you want to change permissions.
Your website files that appear online are located under your root directory or public_html
You can use the left-side panel to navigate through directories or use the search bar at the top-right corner if you know the name or path of your file or directory.
Step 4: Select the File or Folder
Once you’ve found the file or folder, click on it to select it. The file or folder will be highlighted when it is selected.
Step 5: Change the Permissions
With the file or folder selected, look at the top menu in the File Manager. Here, you should see an option labeled “Permissions”. Click on this option.
Step 6: Set New Permissions
A new window will pop up showing the current CHMOD permissions for the selected file or folder. Here, you can modify the permissions as required.
CHMOD permissions are split into three categories: Owner permissions, Group permissions, and Public permissions. Each category has three types of permissions: Read, Write, and Execute.
- Read permissions allow the file to be read.
- Write permissions allow the file to be edited and modified.
- Execute permissions allow the file to be run as a program.
You can set these permissions by checking or unchecking the boxes next to each type of permission.
Step 7: Save Changes
After you’ve set the permissions as required, click on the “Change Permissions” button to save your changes.
Step 8: Verify Changes
Finally, after changing the permissions, you may want to verify if the changes were successful. Select the file or folder again, click on “Permissions” or “Change Permissions”, and you’ll be able to see the new permission values.
Remember, changing file permissions can affect how your website functions. Be careful when changing permissions and only change them if necessary. If you’re unsure, it’s always a good idea to consult with a professional.
In general, files should be set to 644 and directories to 755. This ensures that you can read and write to your files while keeping them secure from unauthorized changes.