|
Here's the chmod tip I wrote for LinuxOrbit.com and Emazing.com:
One of the most common administration tools you will use under Linux is chmod. Chmod allows a user (usually root) to change the permissions of a given file using the syntax
chmod XXX filename
where X is a number from 0 to 7. These numbers represent the permissions for 3 different categories. The first number represents the permissions for the owner of the file. The second number represents the permissions for the group that the owner belongs to. The last number represents all other users outside of the owner and the owner's group. Here's an easy guide for what each number means for the permissions on a given file:
0 None - cannot read or write or execute
1 Can execute, but cannot read or write
2 Write-only, cannot read or execute
3 Write-able/executable
4 Read-only, cannot write to or execute
5 Read-only executable, cannot write to
6 Readable Writeable file, but not executable
7 Readable Writeable Executable file
So if you need to give permissions to a file to make it read/write/executable for the owner and read/executable for the resxt of your system, use the command
chmod 755 filename
and the permissions will be
-rwxr-xr-x
|