📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Linux Command Line File Permissions

File Permissions

5 min read Quiz at the end
File permissions control who can read, write, or execute. chmod 644 file sets normal file permissions. chmod 755 script.sh makes a script executable. chown user:group file changes ownership. ls -la shows permissions.

File Permissions

ls -la
# -rwxr-xr-- 1 alice dev 1024 Jan 15 script.sh
#  --- owner
#     --- group
#        --- others

chmod 755 script.sh   # rwxr-xr-x
chmod +x script.sh    # add execute
chmod -w file.txt     # remove write
chown alice:dev file  # change owner and group
Topic Quiz · 5 questions

Test your understanding before moving on

1. What does chmod 755 mean?
💡 755 = 7(rwx) for owner, 5(r-x) for group, 5(r-x) for others.
2. What does chmod +x do?
💡 chmod +x adds execute permission for owner, group, and others.
3. What does chown do?
💡 chown changes the owner and optionally the group of a file.
4. Which number means read+write+execute?
💡 7 = 4(read) + 2(write) + 1(execute) = full permissions.
5. ls -l shows permissions as:
💡 ls -l shows permissions as -rwxrwxrwx (type, owner, group, others).