File permissions of Linux and Unix systems
Archive - Originally posted on "The Horse's Mouth" - 2005-08-31 08:58:36 - Graham EllisWhat 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 |
d | A directory |
l | A symbolic link |
You then have three groups of three characters, which describe who can do what with the file system object:
First 3 positions | What the User (owner) can do |
Middle 3 positions | What the Group members can do |
Final 3 positions | What the Other users of the system can do |
Within each of the three groups, read as follows:
First character | r or -An r indicates Readable |
Second character | w or -A w indicates Writeable |
Third character | x or -An 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.