loading Posted November 14, 2012 Share Posted November 14, 2012 First of all, we should start with the numerical representation of the system of permissions governing who can read write and execute things in a *nix system. code: This is the hidden content, please Sign In or Sign Up So, as we can see, the level of permissions escalates from 0(no access whatsoever) to 7(full access), and it escalates in a binary style(if you are familiar with it). Now, when you type "ls -l" in your console in any *nix system, you will see something like this: This is the hidden content, please Sign In or Sign Up The first (leftmost) character tells if this file is a regular file, a directory, a special character device, a socket, or any other special pseudo-file device. In this case, the - indicates a regular file. The next three characters, rw- in this example, give the permissions for the owner of the file. The next three characters, r--, give the permissions for the group that the file belongs to. The final three characters, r--, give the permissions for the rest of the world. A dash means that the permission is turned off. In the case of this file, the permissions are set so the owner can read and write to the file, the group can read the file, and the rest of the world can only read the file. According to the table above, the permissions for this file would be 644, where each digit represents the three parts of the file's permission. So, now you understand why "chmod 777 filename" sometimes solves problems... Another useful thing is that there are also symbolic permissions, so you don't need to remember all those numbers(but you should): code: This is the hidden content, please Sign In or Sign Up Link to comment Share on other sites More sharing options...
Recommended Posts