Skip to main content

One post tagged with "Linux"

View All Tags

· 2 min read
NENmSIS

This is an interesting topic to talk about with the aim of understanding the Unix permissions.

Notation of traditional Unix permissions

Symbolic notation

The most common form, as used by the following command, is symbolic notation.

ls -l 

The firs set represents the user class. The second set represents the group class. The third set represents the others class. Each of the three characters represent the read, write and execute permissions.

  • r if reading is permitted, - if is not
  • w if writting is permitted, - if is not
  • x if execution is permitted, - if is not

Example: -rwxr-xr-x: a regular file whose user class has full permissions and whose group and others classes have only the read and execute permissions.

To represent the setuid, setgid and sticky attributes, the executable character ( x or -) is modified. Though these attributes affect the overall file, not only users in one class, the setuid attribute modifies the executable character in the triad for the user, the setgid attribute modifies the executable character in the triad for the group and the sticky attribure modifies the executable character in the triad for others. For the setuid or setgid attributes, in the first or second triad, the x becomes s and the - becomes s. For the sticky attribute, in the third triad, the x becomes t and the - becomes T.