Unix Permissions

Learn how file system permissions work in a Unix environment.

We'll cover the following...

The Unix permissions string has four parts. The following figure explains their meanings.

The groups utility prints the list of groups that the current user belongs to.

We can imagine the Unix permissions as four separate bitmasks. Each of these corresponds to one part of the table above. Each bitmask is three bits, with one bit for each of r, w, and x. Using this approach, we can represent the “-r--r--r--” string like this:

0000 0100 0100 0100

The Latin letters in the Unix permissions have special meanings. First of all, they match the bits that are set to one. The position of each bit defines the allowed action to the object. ...

Access this course and 1400+ top-rated courses and projects.