So how do we use chmod to modify these permissions? We’ll use a command like:
$ chmod 771 my_app
OR
$ chmod g+w my_app
In the context above, these two commands in fact mean the same thing. To see why, we have to understand that chmod has a peculiarity. It accepts instructions to change file permissions for different users either by using combinations of these letters (text or symbolic format), or by using a system of numbers (numeric or octal format). Here’s how the two systems correspond:
Permission to read, r, is given the numeric value of 4 Permission to write, w, is given the value 2 Permission to execute, x, is given the value 1