Articles on: File Management

How to set file permissions (read, write, execute) for individual files or directories in cPanel.

Here's how to set file permissions (read, write, execute) for individual files or directories in cPanel at dotCanada.com:
Log into your dotCanada.com cPanel account.
In the Files section, click on "File Manager".
Navigate to the file or directory you want to modify permissions for.
Right-click on the file or directory and select "Change Permissions".
A new window will open showing the current permissions. Here's what the different values mean:
o Read (4)
o Write (2)
o Execute (1)
To set permissions, just add up the values for the desired permissions. For example:
o 644 (Read + Write for owner, Read for group and world)
o 755 (Read + Write + Execute for owner, Read + Execute for group and world)
Enter the desired value in the "Permissions" box and click "OK".
The permissions will be updated for that file or directory.
Some other useful tips:
• Use 755 for directories to allow users to browse the contents.
• Use 644 for regular files like HTML, images, etc.
• Use 600 to restrict all access except for the owner.
• You can also set recursive permissions for an entire directory and its contents.
dotCanada.com recommends being very careful when changing file permissions, as incorrect settings could lead to security vulnerabilities or website malfunctions.

Updated on: 08/05/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!