Commands.app

chmod

Permissions

Change file permissions

Options & Flags
Available options for this command
-R

Change files and directories recursively

-v

Verbose mode, show all processed files

Examples
Common usage examples

Give owner full permissions, group and others read+execute

chmod 755 script.sh

Make file executable

chmod +x script.sh

Set permissions recursively for web files

chmod -R 644 /var/www/html
Notes
  • Permission format: rwx (read=4, write=2, execute=1)
  • Three digit format represents: owner-group-others
  • Common values: 755 (rwxr-xr-x), 644 (rw-r--r--), 777 (rwxrwxrwx)
Related Commands
You might also find these useful