Jump to content
YOUR-AD-HERE
HOSTING
TOOLS

Locked [*nix] Permissions


loading

Recommended Posts

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

 

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

 

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.