kali-all-commands

๐Ÿ” Linux File Permissions โ€” Quick Reference

โšก Quick help for everyday permission tasks.
๐Ÿ“˜ Need a deep dive? โ†’ Linux File Permissions โ€” Full Guide


List Files with Permissions

ls -la /mnt/c/Users/akash/Desktop

This shows: permissions ยท links ยท owner ยท group ยท size ยท date ยท name


Understanding Permission Format

rwxr-xr-x
โ”‚โ”‚โ”‚ โ”‚โ”‚โ”‚ โ”‚โ”‚โ”‚
โ”‚โ”‚โ”‚ โ”‚โ”‚โ”‚ โ””โ”€โ”€ Others: read + execute
โ”‚โ”‚โ”‚ โ””โ”€โ”€โ”€โ”€โ”€ Group:  read + execute
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Owner:  read + write + execute
Symbol Meaning Value
r Read 4
w Write 2
x Execute 1
- None 0

Common Permission Combos

Numeric Symbolic Use Case
777 rwxrwxrwx Full access for everyone (โš ๏ธ use carefully)
755 rwxr-xr-x Executable files & directories
644 rw-r--r-- Text/config files
600 rw------- Private files (SSH keys, etc.)
500 r-x------ Read+execute for owner only
000 --------- No access at all

Quick Commands

# Full permissions for everyone
chmod 777 filename

# Standard directory permissions
chmod 755 /mnt/c/Users/akash/Desktop/*

# Standard file permissions
chmod 644 /mnt/c/Users/akash/Desktop/*

# Recursive โ€” all directories to 755
find /path -type d -exec chmod 755 {} \;

# Recursive โ€” all files to 644
find /path -type f -exec chmod 644 {} \;

Change Ownership

# Change owner
sudo chown username filename

# Change owner + group
sudo chown username:groupname filename

# Recursive
sudo chown -R username:groupname /path/to/dir

๐Ÿ“˜ Want to learn more? Check the full detailed guide:
Linux File Permissions โ€” Complete Reference


| โ† Back to All Commands | | โ€” |