Access Modes: The permissions/protections of a file or directory are the first line of defense in the security of a Unix system. The basic building blocks of Unix permissions are the Read, Write, and eXecute permissions,
Every file in Unix has the following attributes
User (owner) permissions − actions the owner of the file can perform on the file (rwx).
Group permissions −actions members of the owner’s Unix group can perform on the on the file (rwx).
Other (world) permissions − The permissions for others indicate what action all other users can perform on the file (rwx).
Listing Permission Indicators
ls -l displays nine columns of information, including file permissions.
Changing Permissions (chmod)
To change the file or the directory permissions, you use the chmod (change mode) command. There are two ways to use chmod — the symbolic mode and the absolute mode.
The easiest way for a beginner to modify file or directory permissions is to use the symbolic mode.
Chmod: Symbolic Mode
=> Learn File System Access Modes: Tutorial 5.1 – 5.2 University of Surrey
Chmod: Absolute Mode
The second way to modify permissions with the chmod command is to use a number to specify the permissions for all three fields at one: (eg) chmod 644 fileName
Another helpful graphic:
Note that rwx is represented by 111, rw- is represented by 110, r– is 100, etc.
Each individual digit in absolute mode is an octal number (three bits):
The binary value is based on place values: