December 2018
Beginner
826 pages
22h 54m
English
Next, we changed our file so that anyone could write to it:
$ sudo chmod 646 permissionfile
Here, we passed certain octal values to the permissionfile in order to change the rights for the user, group, and everyone else in turn.
I won't go into great detail on this, but effectively, the first digit indicates what values the user's triad should be, then the group's triad, then everyone else.
Our user gets the value of 6 that translates to read/write; our group can only read 4 and everyone else can read/write 6.
This is because each of the values has a numeric equivalent, as follows:
So, the 6 value is 4+2, or r/w, and the 4 value is only r.
Read now
Unlock full access