The instructions based on the chmod (change mode or “mode change”) are widely used on Linux (or Unix) to change the permissions associated with a file, a mode can be expressed as a number in base eight, or symbolic form the system provides an octal number composed of one to four digits indicating the permissions directly attributed to the file without taking into account those already present. Each number from “0″ to “7″ in the scale of octal chmod has its corresponding symbolic
- 7 = rwx = read, write and execution;
- Rw-= 6 = read and write;
- 5 = rx = read and execute;
- 4 = r-= read;
- 3 =-wx = write, and execute;
- 2 =-w-= write;
- 1 =-x = execution;
- 0 = – = no permission.
Take for example the command:
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">chmod 750 /var/www/function.php</span> chmod 750 / var / www / function.php</span>
In this case:
- 7: A user has permission to read, write and execute;
- 5: members of the group to read and execute but not write (and even remove)
- 0: the non-group not allowed any avrann0.