Permission bits

In Linux, there are total of nine mode bits that set the basic access permissions. The first three bits set the permissions for the owner of the file. The next three bits set the permissions for the members of the file’s group. The last three bits set the permissions for everyone else on the system:

linux permission bits

To display file permissions, you can use the ls -l command:

linux display permission bits

In the example above you can see that the file permission bits are set to rw- for the owner, rw- for the group, and r– for the other class (ignore the first hyphen on the left for now). As you can probably guess, r stands for Read, w stands for Write, and x stands for eXecute (not shown above). The hyphen () means that the permission hasn’t been granted. So, in this example, the permissions of the file bobs_file.txt grant the read and write permissions to the owner (root) and group (bob), but only the read permission for everyone else on the system. The execute permission is not granted to anyone.

Subscribe to our Newsletter

Like us on Facebook

Geek University 2019