Module 05 of 11

Permissions & Ownership

Lessons

About This Module

Linux is a multi-user system, so every file needs rules about who can read it, change it, or run it. This module explains how those rules work and how to control them.

It starts with reading permissions in the output of ls -l: the owner, group, and other classes and the r, w, and x bits. From there you'll learn to change permissions with chmod using both symbolic and numeric modes, then to change ownership with chown and chgrp. It closes with default and special permissions: umask, the setuid and setgid bits, and the sticky bit.

Avoid the shortcut of chmod 777, because it fixes the error by removing the protection. When you can explain why a file is or isn't accessible, continue on to Text Processing & Pipes.

Lessons

4 videos
01

Understanding Linux File Permissions

Read the output of ls -l and learn what the read, write, and execute bits mean for the owner, the group, and everyone else.

02

Changing Permissions with chmod

Set permissions using symbolic mode (u+x, go-w) and numeric mode (755, 644), and learn how to choose sensible values.

03

Ownership: chown & chgrp

See who owns a file, change its owner and group with chown and chgrp, and learn why some changes need sudo.

04

Default & Special Permissions: umask, setuid, setgid & Sticky Bit

Understand where the default permissions of new files come from, and what the special bits do on programs and shared directories such as /tmp.