| chmod |
|
|
|
| Friday, 04 December 2009 16:01 | |||||||||||||||
Command chmodchmod command changes the permissions of one or more files. Syntaxchmod [-cfvR] permissions files
Options-c displays only files with changed permissions.-f suppress error messages. -v displays detailed information about changes of access rights. -R recursively changes the permissions of files in all subdirectories. DescriptionTo effectively use chmod to know how to set permissions. One ways involves a concatenation of one letter from each of the following tables consecutively (Who / Action / Access):
To grant read access to all files in directory, type chmod a+r *. For permit the execution of the file to all users, type chmod + x filename. Another way to specify permissions is to use sequence CONTRACT PERIOD three octal digits. In a detailed listing of the right to read, write and execute for user, group and others look like a sequence rwxrwxrwx (with a dash in place of letters for prohibited transactions). Row rwxrwxrwx can be regarded as a three-fold repetition of the line rwx. Now set the value r = 4, w = 2 and x = 1. To obtain the sequence rwx, add the values r, w and x. Thus, rwx = 7. Using this formula, you can assign three-digit value of any rights of access. |