Installation guide

Chapter 11. Shell Prompt Basics 117
Figure 11-9. Permissions for sneakers.txt
Other information to the right of the group includes file size, date and time of file creation, and file
name.
The first column shows current permissions; it has ten slots. The first slot represents the type of file.
The remaining nine slots are actually three sets of permissions for three different categories of users.
-rw-rw-r--
Those three sets are: the owner of the file, the group in which the file belongs, and "others," meaning
users and groups not yet specified.
- (rw-) (rw-) (r--) 1 sam sam
| | | |
type owner group others
The first item, which specifies the file type, can show one of the following:
d — a directory
-(dash) — a regular file (rather than directory or link)
l — a symbolic link to another program or file elsewhere on the system
Beyond the first item, in the following three sets, you will see one of the following:
r — file can be read
w — file can be written to
x — file can be executed (if it is a program)
When you see a dash in owner, group, or others, it means that particular permission has not been
granted. Look again at the first column of sneakers.txt and identify its permissions.
[sam@halloween sam]$ls -l sneakers.txt
-rw-rw-r-- 1 sam sam 150 Mar 19 08:08 sneakers.txt
[sam@halloween sam]$
The file’s owner (in this case, sam) has permission to read and write to the file. The group, sam, has
permission to read and write to sneakers.txt, as well. It is not a program, so neither the owner or
the group has permission to execute it.