chmod
Change file permissions using octal modes (e.g., 644). Use --dry_run to preview changes safely before applying.
Instructions
Change file permissions using octal modes (e.g., 644, 755). Destructive: modifies filesystem permission bits. Use --dry_run to preview without changing. Returns JSON with old and new mode values. Use to control read/write/execute access. Not for ownership changes — use 'chown' or 'chgrp'. See also 'chown', 'chgrp'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Octal mode such as 644, 755, or 0644 (omit when using --reference). | |
| paths | Yes | Paths whose mode should change. | |
| dry_run | No | Report operations without changing files. | |
| no_follow | No | Do not follow symlinks where supported. | |
| reference | No | Copy mode from reference file instead of a literal mode. |