A feature of Linux is that many users can be logged on the same hardware. Each of them can be assigned appropriate permissions to read and write or to run programs. These permissions are granted by the system administrator (root), who has access to all resources. Permissions are granted to the logged in user (owner), group and other people.
Attributes of the system element are in the form:

   d – folder,   (minus) – file,    l – dowiązanie
  r – read,   w – write,   x – run,    (minus) – no rights,

Each entitlement shall have a numeric value assigned to it:
  r - the rights to read the file - numeric value 4
  w - rights to modify and save the file - numeric value 2
  x - rights to run the file - numeric value 1
   - (minus) inaccessibility - numeric value 0

  ---   0    no rights
  r--   4+0+0=4    read-only
  rw-   4+2=6    read and write
  rwx   4+2+1=7   read, write and run
  r-x   4+1=5    read and run, cannot be modified
  --x   1    run-only

  Examples of message after command „ls -l”:

  -rwx r-x r-x 1 marcin progr 512 juni 17 2017 14:07 sort
The user "marcin" in the group "progr" has full rights to the file "sort", while the members of the group and other people only to read and run without modification.
  d r-- r-- r-- 2 karol win 12588 juni 7 2016 22:17 Temp
Everyone has only the right to read the contents of the "Temp" folder.


can be done by means of a 'chmod' command and a numerical notation.

Rights -rwx r-x r-x for a "sort" file we get by writing the command

    chmod 755 "sort"

Rights d r-- r-- r--for d r-- r-- r-- for a folder "Temp"

    chmod 444 Temp

The command "chmod" can also be used in text version e.g.

 chmod g+w plik   granting the right to save the file for the group
 chmod u-x plik   deactivation of the right of actuation for user
 chmod ugo-x plik   deactivation of the right of actuation for all
 chmod u=rwx plik   grant the user all rights to the file
 chmod go=rx plik   assigning read and run rights to a group and others
 chmod u=rwx,go=r plik   user full rights, group and others read only
 chmod ug=rw plik   user and group reading and modifying the file
 chmod g-w,o+r plik   taking away from the group the right to modify the file, assigning read for others