chmod
PermissionsChange file permissions
Options & Flags
Available options for this command
-RChange files and directories recursively
-vVerbose mode, show all processed files
Examples
Common usage examples
Give owner full permissions, group and others read+execute
chmod 755 script.shMake file executable
chmod +x script.shSet permissions recursively for web files
chmod -R 644 /var/www/htmlNotes
- 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