chmod - Change Permissions in Linux

From the Linux Essential Commands cheat sheet · File Permissions & Ownership · verified Jul 2026

chmod - Change Permissions

Modify file and directory access permissions

bash
# Numeric mode
chmod 755 file.sh      # rwxr-xr-x
chmod 644 file.txt     # rw-r--r--
chmod 600 private.key  # rw-------

# Symbolic mode
chmod u+x script.sh    # Add execute for user
chmod g-w file.txt     # Remove write for group
chmod o+r file.txt     # Add read for others
chmod a+x file.sh      # Add execute for all

# Recursive
chmod -R 755 directory/
✅ 755 = rwxr-xr-x (common for scripts and directories)
💡 644 = rw-r--r-- (common for regular files)
🔍 First digit=user, second=group, third=others
⚡ r=4, w=2, x=1 (add numbers for combinations)
permissionssecuritychmod

Continue with Linux Essential Commands

Save the full cheat sheet or work through every related task.

More Linux tasks

Back to the full Linux Essential Commands cheat sheet