JANOS Help System: [Commands] [Topics] [Tech Support] [Printable Manual] [Search]
CHMOD User Commands NAME chmod - Modify Permissions SYNOPSIS chmod [OPTIONS] MODE FILESPEC DESCRIPTION This command alters the permissions for FILESPEC. Wildcards may be used to alter a set of files or directories. There are two optional syntax for MODE that define how permissions are altered. This is similar to the Linux usage. Numeric Syntax The numeric representation contains 3 digits each specifying the permissions for the owner, group and others in that order. Each is a bitwise mapping of 'rwx' where: r is 4 (bit 2), w is 2 (bit 1) and x is 1 (bit 0). For example: --- 0 r-- 4 r-x 5 rw- 6 rwx 7 And therefore: 777 -rwxrwxrwx 644 -rw-r--r-- Symbolic Syntax [ugoa][-+=][rwx][, ...] The symbolic approach can be used to conditionally alter permissions. Here MODE is a command separated list of actions defined with a mnemonic. Where: u User or Owner g Group o Others a All (Owner, Group and Others) - Remove permissions + Add permissions = Set permissions r Read permission w Write permission x Execute permission EXAMPLES To set test.bat permissions to -rwxr-xr-x use either syntax: chmod 755 test.bat chmod u=rwx,go=rx test.bat chmod a=rx,u+w test.bat To add execute permissions on test.bat for all users. This does not alter any previously defined read or write permissions. chmod a+x test.bat OPTIONS -S When wildcards are used this applies the change recursively through sub-directories. -D Alter permissions on a directory. This option is required when changing permissions on one or more directories. This is necessary to signal the intent in wildcard and recursive actions. -V Provides additional detail when changes occur. SEE ALSO HELP Topics: PERMISSIONS, LS [/flash/manpages/manpages.hlp:2022]