You should read about basic file permissions in a Linux tutorial (see LearningLinux
). Here are some quick tidbits about file permissions.
In the chmod
command, the letters `rwxXstugo
' select the new permissions for the affected users: read (r), write (w), execute (or access for directories) (x), execute only if the file is a directory or already has execute permission for some user (X), set user or group ID on execution (s), sticky (t), the permissions granted to the user who owns the file (u), the permissions granted to other users who are members of the file's group (g), and the permissions granted to users that are in neither of the two preceding categories (o).
- Linux kernel ignores the sticky bit on files.
- When the sticky bit is set on a directory, files in that directory may be unlinked or renamed only by root or their owner. Without the sticky bit, anyone able to write to the directory can delete or rename files. The sticky bit is commonly found on directories, such as /tmp, that are world-writable.
: permissions a new file will not get; see DirectoryUMask
for umask for directories