Main Content

File permissions of Linux and Unix systems

Archive - Originally posted on "The Horse's Mouth" - 2005-08-31 08:58:36 - Graham Ellis

What does -rwxr-x--- mean in the output of a Linux ls (list symbols) command?

The first character indicates the type of file system object that the line describes, and the commonly found characters are:
-A regular file
dA directory
lA symbolic link


You then have three groups of three characters, which describe who can do what with the file system object:
First 3 positionsWhat the User (owner) can do
Middle 3 positionsWhat the Group members can do
Final 3 positionsWhat the Other users of the system can do


Within each of the three groups, read as follows:
r or -w or -x or -
First characterAn r indicates Readable
Second characterA w indicates Writeable
Third characterAn x indicates eXecutable for a plain file or aXessible for a directory

If you see an s or a t (lower case) in the third position, it inicates that the "x" is set, and conveys additional information for the administrator. If you see an S or a T (upper case), it indicates that there is NOT an X set.

Note that write permission to a directory allows the person with that permission to add files to the directory and delete files from within it, even if they don't have any access right at all to the actual file being deleted.