Beginner Topic 3 of 50 DevOps & Tooling
File Permissions
Read, write and execute rights for users and groups.
How it works
Each file has an owner, a group and everyone else, and each class gets read, write and execute bits. ls -l shows them as rwxr-xr--, and chmod changes them either symbolically (u+x) or in octal, where r is 4, w is 2 and x is 1, so 755 means rwxr-xr-x. chown and chgrp change ownership, and umask sets the default for new files. On directories, execute means permission to enter and write means permission to create or delete entries. The setuid, setgid and sticky bits add special behavior such as running as the file owner.
Where it is used
Permissions protect SSH keys, web server files, shared project folders and scripts that must be executable, and they limit damage when a service is compromised.
Common pitfall
chmod 777 is almost never the right fix and exposes files to every user. Private keys with loose permissions are rejected by SSH. Grant the least access that works and fix ownership instead of widening permissions.
Where it fits in the course
File Permissions is topic 3 of 50 in DevOps & Tooling, rated Beginner. It follows Linux File System Layout. The next topic is Text Editors and IDEs.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the DevOps & Tooling quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the DevOps & Tooling quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is File Permissions?
Where do people use File Permissions?
What is the most common mistake with File Permissions?
What should I learn before this topic?
How can I practice it?
Is File Permissions hard to learn?
How long does it take to learn File Permissions?
Which topics are related to File Permissions?
What should I study after File Permissions?
Related topics
- Linux File System Layout (DevOps & Tooling)
- Text Editors and IDEs (DevOps & Tooling)
- Command Line Basics (DevOps & Tooling)
- Package Managers (DevOps & Tooling)
- File Handling (Programming Fundamentals)
- Distributed File Systems (Distributed Systems & Cloud)
- File Systems (Operating Systems)