Revision [624]
This is an old revision of CommandChmod made by DavidLee on 2009-06-13 13:00:42.
Command chmod
This command is part of the posix extensions and needs to be imported to be available to the shell.
See Posix Commands
Name
chmod change file permissionsSynopsis
chmod [options] mode[,mode ...] file [file ...]Options
-R
-recursive apply mode changes recursively
Description
The "mode" string specifies the changes to be made to the file permissions. Each file permissions (and if -R is specified all decendant files) are modified according to the mode string. The mode string takes the form [uoa][+-=][rwx]The first part of the mode string can be any combination of "u" for user, "o" for others or "a" for all.
The next part is either a +, -, or = meaning "add the permssions" , "remove the permissions" or "set the permissions".
The final part can be any combination of "r" for read, "w" for write and "x" for execute.
Multiple operations can be separated by a "," e.g.
chmod a+w,u+r file
Return Value
Returns 0 if the command executed successfully, 1 if there was an error.CategoryCommands
CommandsPosix