Managing File and Directory Permissions in Linux

There are three types of permissions: rwx, which stand for read, write, and execute.

Files correspond to three object groups. Each object group protects the three types of permissions: rwx.

The three object groups are the owner’s permissions, the group’s permissions, and the permissions for other users in the system.

Binary representation of permissions:

r 100

w 010

x 001

Octal representation of permissions:

r 4

w 2

x 1

The command chmod can modify file permissions using either characters or numbers.

Permissions can be represented using ugo to indicate the object.

Use + or to add or remove rwx from a file or path.

Use = to directly assign permissions.

Use -R to modify permissions recursively.

chmod 554 file modifies the permissions of file to r-xr-xr--.

Leave a Comment