File permissions in cPanel determine who can read, write, or execute files and directories on your hosting account. Correctly managing permissions is essential for both security and functionality — incorrect settings may expose sensitive files or cause your website to break.

This guide explains how to check and change file or folder permissions using the File Manager tool in cPanel.

 

Modifying File or Directory Permissions

1. Log in to cPanel

  • Open your browser and go to your cPanel login URL (e.g., https://yourdomain.com/cpanel).

  • Enter your username and password.

  • After logging in, go to the Files section.

2. Open File Manager

  • In the Files section, click File Manager.

  • This opens your website’s root file directory (often /public_html).

3. Locate the File or Folder

  • Navigate to the directory containing the file or folder you want to edit.

  • Right-click on the item and select Permissions, or select the item and click Permissions in the top menu.

4. Understand File Permissions

Permissions are represented either with checkboxes or a numeric code (e.g. 644, 755). These correspond to the access level for:

  • Owner – The account that owns the file.

  • Group – Other users in the owner’s group.

  • World (Public) – All other users, including website visitors.

Each permission type has a value:

  • Read (r) = 4

  • Write (w) = 2

  • Execute (x) = 1

The three-digit code (e.g., 755) represents the total for each role:

  • First digit = Owner

  • Second = Group

  • Third = World

5. Modify Permissions

  • In the Change Permissions dialog, you can:

    • Check or uncheck Read, Write, and Execute boxes.

    • OR type the numeric value directly (e.g., 644).

  • Changes apply immediately once saved.

6. Save Changes

  • Click Change Permissions to apply your settings.

  • The new permissions will take effect immediately.

 

Best Practices for File Permissions

Following these guidelines helps protect your site and ensure proper function:

Recommended File Permissions

  • Files: 644

    • Owner: Read & write

    • Group & World: Read-only

  • Directories (Folders): 755

    • Owner: Read, write & execute

    • Group & World: Read & execute

Note: Directories must have execute permission for users to open or browse them.

 

Additional Tips

  • Never set permissions to 777 (full access for everyone) unless absolutely necessary, as this is a major security risk.

  • For large folders, consider using recursive permission changes via command line (if you have SSH access) or your hosting control panel’s advanced tools.

  • If you're unsure about a permission setting, check with your CMS documentation (e.g., WordPress) or hosting support.

 

Managing file and folder permissions in cPanel is a critical part of maintaining a secure and functional website. Use the File Manager to review and adjust permissions when needed, and follow best practices to reduce vulnerabilities.

Was this answer helpful? 0 Users Found This Useful (0 Votes)