CertGrid CertGrid
Hands-on Lab·LPIC-1

Permissions, ownership, and the two kinds of link

Objectives 104.5 and 104.6 cover permissions, ownership and links. This guide watches the umask decide a new file's mode, sets permissions in both spellings, shows what execute means on a directory, works through setuid, setgid and sticky - including a setgid bit that survives chmod 1777 - and separates a hard link from a symbolic one by deleting what they point at.

101: Devices and Filesystems Guide 27 of 33 Beginner

One host. Permissions and links behave identically on the RPM family; only the default umask differs between distributions, and the page says where to read it.
Server NameIP AddressOSRolesCPURAMHDD
LPIC1-A01192.168.0.76Ubuntu 26.04 LTSDebian-family host - dpkg and apt, which objective 102.4 names2 Core4 GB50 GB

This guide includes

Use this when a file is unreadable by someone who should be able to read it, or before granting a shared directory to a team. This matters because two of these rules are counter-intuitive: a directory needs execute permission for its contents to be opened at all, and a numeric chmod does not clear a directory's setgid bit.

Before you start

  1. The mode a new file gets, and what decided it

  2. chmod, in both spellings

  3. What execute means on a directory

  4. The three bits above the nine

  5. The setgid bit that survived a numeric chmod

  6. Ownership, which only root can give away

  7. The two kinds of link

  8. Putting the machine back

Official sources