Unix 'chmod' tutorial:


The chmod command is actually quite a bit easier than most tutorial sites make it out to be.
This is something that's always troubled me, so I made my own.



read write execute
4
2
1



Basically, that's all that makes up chmod. Pretty simple 'eh?


Lets look at it more closely:
Chmod is made up of three numbers like so: XXX. 777, 755, 666, 711 are all examples of this.

The order is as follows: the first number is the USER permissions. This is the user that owns the file. The second, or middle number, is the GROUP permissions (the group which the file is owned by). The last number (far right) is the permission for ALL OTHERS.

Examples:
chmod 777: readable, writable, executable by ALL USERS (DANGEROUS).
chmod 755: executable, readable, writable by the owner, but only executable and readable by the members of the group or any other system users.
chmod 640: readable, writable by the owner, only readable by members of the group and denied for everyone else.

Please send me an email at jp@ox.cx and let me know what you thought of the tutorial. Any feedback would be greatly appreciated.

(mirrored from http://ox.cx/~julian/jp/unix/chmod.html )