Pages

File ownership and permissions

Each file has an associated user ID and group ID that define the owner of the file
and the group to which it belongs. The ownership of a file is used to determine the
access rights available to users of the file.
For the purpose of accessing a file, the system divides users into three catego-
ries: the owner of the file (sometimes termed the user of the file), users who are
members of the group matching the file’s group ID ( group), and the rest of the
world (other). Three permission bits may be set for each of these categories of user
(making a total of nine permission bits): read permission allows the contents of the
file to be read; write permission allows modification of the contents of the file; and
execute permission allows execution of the file, which is either a program or a script
to be processed by some interpreter (usually, but not always, one of the shells).
These permissions may also be set on directories, although their meanings are
slightly different: read permission allows the contents of (i.e., the filenames in) the
directory to be listed; write permission allows the contents of the directory to be
changed (i.e., filenames can be added, removed, and changed); and execute (some-
times called search) permission allows access to files within the directory (subject to
the permissions
From Book The Linux Programming inTerface

0 comments:

Post a Comment