|
|
|
Understanding File Permissions
|
||||||||||||||||||||||||||||||||||||||||||||
There are three user categories: User (the owner of the file), Group (the security group you are in), and Other (for the world to see). Each category has three permissions that can be set: r, w, and x to read, write, and execute a file, respectively. Permissions consist of three numbers: 4 for Read, 2 for Write, and 1 for Execute access. By adding these numbers together, you form the permissions that make up one digit. This table can be used as a quick reference:
For example, 4 + 2 + 1 = 7, which grants read, write, and execute permissions; 4 + 1 = 5, which grants only read and execute permissions. Thus, 755 grants 7 (read, write, execute) to the owner of the file, and 5 (read and execute) to the group the file is in and 5 (read and execute) to the world. Each digit corresponds to a set of permissions (read, write, or execute) and the position of the digit corresponds to the user category (left = owner, middle = group, right = other). The single-digit numbers are defined for all three user categories as the following:
Some file permission examples: 777 - all can read/write/execute (full access). Some directory permission examples: 777 - all can read/write/search. 777 - directories with proper permissions on files in directory, use this one very carefully You can change file permissions with the Web Shell File Manager You can change file permissions with some FTP transfer programs such as WS_FTP. Warning: You may be tempted to simply use chmod 777 on all the files and directories since that assures the Web server can do anything with the files. However, it is strongly advised that you do not leave the files in this state. It is considered a major security risk to leave your scripts open to changes by the Web server instead of being read-only. We recommend you consult with your programmers to set your file permissions properly. |
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
|