Quick Start Guide

Example 17.1: Access Permissions For Files and Folders
-rw-r----- 1 tux users 0 2006-06-23 16:08 checklist.txt
-rw-r--r-- 1 tux users 53279 2006-06-21 13:16 gnome_quick.xml
-rw-rw---- 1 tux users 0 2006-06-23 16:08 index.htm
-rw-r--r-- 1 tux users 70733 2006-06-21 09:35 kde-start.xml
-rw-r--r-- 1 tux users 47896 2006-06-21 09:46 kde_quick.xml
drwxr-xr-x 2 tux users 48 2006-06-23 16:09 local
-rwxr--r-- 1 tux users 624398 2006-06-23 15:43 tux.sh
As shown in the third column, all objects belong to user tux. They are assigned to
the group users which is the primary group the user tux belongs to. To retrieve the
access permissions the rst column of the list must be examined more closely. Let's
have a look at the le kde-start.xml:
Permissions for
Others
Group PermissionsUser PermissionsType
r--r--rw--
The rst column of the list consists of one leading character followed by nine charac-
ters grouped in three blocks. The leading character indicates the le type of the object:
in this case, the hyphen () shows that kde-start.xml is a le. If you nd the character
d instead, this shows that the object is a directory, like local in Example 17.1, Access
Permissions For Files and Folders” (page 201).
The next three blocks show the access permissions for the owner, the group and
other users (from left to right). Each block follows the same pattern: the rst position
shows read permissions (r), the next position shows write permissions (w), the last
one shows execute permission (x). A lack of either permission is indicated by -. In
our example, the owner of kde-start.xml has read and write access to the le but
cannot execute it. The users group can read the le but cannot write or execute it.
The same holds true for the other users as shown in the third block of characters.
17.5.2 Files and Folders
Access permissions have a slightly dierent impact depending on the type of object
they apply to: le or directory. The following table shows the details:
Table 17.1: Access Permissions For Files And Directories
FolderFileAccess Permission
Users can view the con-
tents of the directory.
Users can open and read
the le.
Read (r)
Without this permission,
users cannot list the con-
Shell Basics 201