hugo% ls -lga total 26 drwxr-xr-x 2 jeffy se 512 May 9 16:13 . drwxr-xr-x 3 jeffy se 1024 May 9 16:09 .. -rw-r--r-- 1 jeffy se 28 May 9 16:12 Makefile -rwxr-xr-x 1 jeffy se 24576 May 9 16:13 foo -rw-r--r-- 1 jeffy se 57 May 9 16:13 foo.c
The permission string consists of 10 characters.
The first character indicates the type of file. It is usually a "d" indicating a directory, an "l" indicating a symbolic link, or a "-" indicating a plain old vanilla file. There are a number of other possibilities, but they are rare, showing up mostly in /dev.
The other nine characters are divided into three groups of three. The first group shows the permissions given to the user who owns the file. The second group shows the permissions given to any member of the group of the file. The third shows the permissions given to every other person in the universe.
The first character of each triplet is an "r" if that entity is allowed to read the file. The second character is a "w" if that entity is allowed to write to the file. The third is an "x" if that entity is allowed to execute the file.
So for example:
-rwxr-xr-- 1 jeffy se 24576 May 9 16:13 foo
Next week I'll get into how to use chmod(1) to modify the permissions.
Up to the TTTT index
Tuesday Tiny Techie Tips are all © Copyright 1996-1997 by Jeff Youngstrom. Please ask permission before reproducing any of this material.