Administrator's Guide

The r permission allows users to view or print the file. The w permission allows users to
write (modify) the file. The x permission allows users to execute (run) the file or to search
directories.
Figure 5-1 shows the traditional permissions fields.
Figure 5-1 File and Directory Permission Fields
permission
owner group others
rwx rwx rwx
r read
w write
x execute
The user/owner of a file or directory is generally the person who created it. If you are
the owner of a file, you can change the file permissions with the chmod command.
The group specifies the group to which the file belongs. If you are the owner of a file,
you can change the group ID of the file with the chgrp command.
The meanings of the three types of permissions differ slightly between ordinary files and
directories. See Table 5-1 for more information.
Table 5-1 Differences Between File and Directory Privileges
DirectoryFilePermission
Contents can be read, but not
searched. Normally r and x are
used together.
Contents can be viewed or
printed.
r (read)
Entries can be added or removed.Contents can be changed or
deleted.
w (write)
Directory can be searched.File can be used as a program.x (execute)
5.1.1 Setting File Access Permissions
The chmod command changes the type of access (read, write, and execute privileges)
for the file's owner, group members, or all others. Only the owner of a file or a user with
the appropriate privileges can change file access. See chmod(1).
88 File System Security