ATC
Foundations Lab  · On-demand

Ownership and Permissions

Solution overview

In this lab you learn how Linux decides who can read, change, run, and delete each file. You start by reading long listings field by field and working out which of the owner, group, and others triplets applies to you, using real system files such as /etc/shadow and /usr/bin/ls. You then set modes as octal numbers with chmod, change a file's group with chgrp and its owner with chown, and see why only the owner or root can change a mode. You predict the mode a brand-new file gets and learn how the umask produces it. Finally, you delete a file you cannot write, lock a directory, and take away its execute bit, which shows that a directory's own bits decide who can list it, enter it, and delete from it.

Lab diagram

Loading