File permissions

File permissions

Each file and folder located in your account has certain permissions assigned. They define who is authorized to write, read or execute this file.

Once it is created in your cPanel, default permissions are assigned. In most cases, there is no need to change them, but certain installations or updates may require a file or folder permissions change.

There are three types of accesses: 

  • read: The file can be only read mode
  • write: The file can be edited
  • execute: The file can be executed as a program
There are three types of user groups, these access types can be applied to: 
  • owner: The owner of the file
  • group: Files which are in the same folder or group
  • world: anyone else
The access levels are also defined in numbers: 
  • 0 - no access to the file
  • 1 - execute only
  • 2 - write only
  • 3 - write and execute
  • 4 - read-only
  • 5 - read and execute
  • 6 - read and write
  • 7 - read, write and execute (full permissions)
The following permissions need to be set in order for your files to be displayed properly in the browser: 
  • For all HTML and image files, the permissions have to be set to 644 (or 0644). They will be readable by all the user groups, but writable by the user only. These permissions are set automatically when the file is created.
  • Folders the permissions have to be set to 755 (or 0755). The folders will be readable and executed by others, but writable by the user only. These permissions are set automatically when the folder is created.
  • For all CGI files, the permissions have to be set to 755 (or 0755). The files will be readable and executed by others, but writable by the user only. These permissions are NOT set automatically once the file is created, you should adjust them manually. 
  •  94 Users Found This Useful
  •  
  • payment
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Termination of hosting accounts

Suspended accounts are terminated based on the billing cycle of the accounts as follows: For...

My website is not loading

There are several reasons your site may not load. The most common reason is making use of...

Inode usage on shared hosting

Inode Usage An inode is a data structure used to keep information about a file on your hosting...

I'm getting IP address has changed! errors

cPanel will sometimes throw out the error: IP address has changed! This is usually due to you...

I've upload my files but it doesn't work on the internet. What am I doing wrong?

The main reason this happens is that the user has uploaded his content to the root of his account...