Changing File/Folder Permissions
All files on UNIX-based systems (including Linux) have access permissions. These permissions determine how users and the operating system interact with files. There are three types of access:
- Read (r) – Files with read access can be displayed to the user.
- Write (w) – Files with write access can be modified by the user.
- Execute (x) – Files with execute access can be run as programs by the user.
Access types are set for three categories of users:
- User – The owner of the file.
- Group – Other users who belong to the same group.
- World – All other users.
Recommended File and Folder Permissions
The web server must be able to read your website files to display them correctly in a browser. Below are the appropriate permissions for different file types:
- HTML files and images: Set to 644 (readable by User, Group, and World; writable by User). This is automatically set when you upload files.
- Folders: Set to 755 (readable and executable by User, Group, and World; writable by User). This is automatically set when creating folders.
- CGI scripts (in the cgi-bin folder): Set to 755 (readable and executable by User, Group, and World; writable by User). You must manually change permissions after uploading.
Security Warning: Never set files or folders to be writable by others. Doing so may allow unauthorized users to modify or delete your content.
How to Change File or Folder Permissions in cPanel
- Open your File Manager in cPanel.
- Navigate to the file or folder whose permissions you want to change.
- Click on the file or folder name.
- Click the Change Permissions option in the top menu.
- Select the appropriate checkboxes to adjust permissions. The numeric value will update automatically.
- Click Change Permissions to apply the new settings.
Below is an example of the cPanel File Manager permissions interface:
For reliable hosting with full cPanel access, check out UnderHost.com. We offer offshore hosting, cloud VPS, and dedicated servers with secure file management options.