Solaris Common Messages and Troubleshooting Guide

chmod: ERROR: invalid mode


This message from the chmod(1) command indicates a problem in the first non-option argument.


If you are specifying a numeric file mode, you can provide any number of digits (although only the final one-to-four are considered), but all digits must be between 0 and 7. If you are specifying a symbolic file mode, use the syntax provided in the chmod(1) usage message to avoid the "invalid mode" error message: Usage: chmod [ugoa][+-=][rwxlstugo] file ...

Some combinations of symbolic key letters produce no error message, but fail to have any effect. The first group, [ugoa], is truly optional. The second group, [+-=], is mandatory for chmod(1) to have an effect. The third group, [rwxlstugo], is also mandatory for effect and can be used in combination when that combination does not conflict.