Please Login or Register

Knowledgebase

File Permissions (chmod)

The Linux file permissions have differnet levels of authority for different users/groups.

Here the basic permissions you need to know about.

  • Read - The "read" permission allows a user or program to open and "read" the data within the file.
  • Write - The "write" permission allows a user or program to write or edit data in a file.
  • Execute - The "execute" permission allows a user or program to execute or run a file, if it is a program or a script

Setting Permissions

If you are setting permissions via FTP the process will be different depending on the FTP program you are using. Most FTP clients provide a visual method of setting file permissions and will show a selection of tick boxes for each permission, an example of FileZillas permission editing window is below. 

XDnet: FileZilla FTP Client... Permissions Editor

A similar permissions editor is avalible in the cPanel file manager as well (as seen below).

XDnet: cPanel - File Manager - Permissions Editor

Setting Permissions using SSH:

Assuming you have SSH or Shell access you can change file permisions that way, examples or a how to will not be provided here as we feel it will confuse less able users and it is assumed if you are using SSH or Shell you Should have a reasonably advanced knowledge of the Linux OS.

Setting Permissions Numerically

In the second method, special numeric codes are used in place of the letters system. Each permission level is assigned a value, as per the following chart:

Permission Value
execute 1
write 2
read 4
no permissions 0

To determine the value of a set of permissions, their numbers are added. For instance, the numeric code 5 equals execute and read permissions (1 (execute) + 4 (read) = 5). This leaves eight possible combinations for each group, as shown in this table:

Numeric Value Permissions
0 no permissions
1 execute permission
2 write permission
3 write and execute permissions
4 read permission
5 read and execute permissions
6 read and write permissions
7 read, write, and execute permissions





Was this answer helpful?
Add to Favourites Add to Favourites   Print this Article Print this Article
Also Read

Powered by WHMCompleteSolution

Language:


Web Hosting
Client Login
Web Hosting

Email

Password

Remember Me


Web Hosting
Search
Web Hosting




Follow Us on Twitter