H
10Corp Premium Hosting

Managing File Permissions

Last Updated: March 2026 3 min read

Managing File Permissions

File permissions control who can read, write, and execute files on your hosting server. Correct permissions are essential for both security and proper website functionality.

Understanding Permission Numbers

Linux file permissions use a three-digit numeric system (e.g., 755, 644), where each digit represents permissions for a different user group:

PositionUser Group
First digitOwner — The account that owns the file
Second digitGroup — Users in the file’s group
Third digitOthers — Everyone else (public)

Each digit is a sum of permission values:

ValuePermission
4Read (r)
2Write (w)
1Execute (x)
0No permission

Examples:

  • 755 = Owner: read+write+execute (7), Group: read+execute (5), Others: read+execute (5)
  • 644 = Owner: read+write (6), Group: read (4), Others: read (4)
File TypePermissionNumeric
Directoriesrwxr-xr-x755
HTML/PHP/JS filesrw-r–r–644
Configuration filesrw-r—–640
.htaccessrw-r–r–644
CGI/Perl scriptsrwxr-xr-x755
wp-config.phprw-r—–640 or 600
Upload directoriesrwxr-xr-x755

Changing Permissions in cPanel File Manager

  1. Log into cPanel and open File Manager.
  2. Navigate to the file or directory.
  3. Right-click and select Change Permissions.
  4. Check/uncheck the appropriate boxes or enter the numeric value.
  5. Click Change Permissions to save.

Changing Permissions via SSH

Single file:

chmod 644 filename.php

Single directory:

chmod 755 directoryname

All files in a directory recursively:

find /home/username/public_html -type f -exec chmod 644 {} \;

All directories recursively:

find /home/username/public_html -type d -exec chmod 755 {} \;

Changing Permissions via FTP

Most FTP clients (like FileZilla) let you change permissions:

  1. Right-click the file or directory.
  2. Select File Permissions (or Properties).
  3. Enter the numeric value or check the appropriate boxes.
  4. For directories, you can apply recursively to contents.

Common Permission Issues

403 Forbidden Error:

  • The web server can’t read the file. Ensure files are at least 644 and directories 755.

500 Internal Server Error:

  • Permissions set to 777 can cause this error on some servers. Reduce to 755 for directories and 644 for files.

Files can’t be modified:

  • The owner may not have write permission. Set to 644 or 664.

Security Warnings

  • Never use 777 permissions. This gives everyone read, write, and execute access — a major security risk.
  • Restrict sensitive files like wp-config.php or .env to 640 or 600.
  • Check permissions after uploading — FTP clients may upload with incorrect permissions.
  • If a web application asks you to set 777 permissions, look for alternative solutions first.

Checking File Ownership

Via SSH:

ls -la /home/username/public_html/

The output shows owner, group, permissions, and file names. If ownership is wrong, contact 10Corp support for assistance, as changing ownership typically requires root access.

For file permission help, contact 10Corp support.

Tags: hosting file-permissions security chmod linux

Still need help?

Our support team is available 24/7 to assist you.