Linux Labs

Users, permissions, and processes / Stage 4 of 13

A shared directory: setgid, sticky, and umask

Not running Starting usually ~20 s
Leave the lesson

Step 7 of 7 · summary · 2 min

Summary

  • A new file gets the process's primary group; setgid (s) on a directory gives new files the directory's group.
  • A new file's mode is the requested 666 or 777 minus the letters of the umask; logging in sets the mask, and ~/.profile changes it.
  • Sticky (t) leaves deleting a file to its owner; on Ubuntu it gets in the way of appending to others' files, so a directory for editing together needs only setgid.
  • plan.txt from the start of the lesson got alice's personal group: bob saw the others triple and could not append to the file, yet he deleted it with w on a directory without sticky.
Ubuntu 24.04
Loading…