back to labs
Add the Sticky Bit to a Shared Dir
MediumLinux+ Exam Prep10-15 minThe brief
The world-writable shared directory /shared lets any user delete ANY file — even ones they don't own. The fix is the sticky bit: with it set, users can only delete their OWN files (this is exactly how /tmp is protected). Add the sticky bit to /shared.
chmod +t /shared # or: chmod 1777 /shared
Grading checks the sticky bit is set (the 't' in drwxrwxrwt). Leave the directory writable — you're adding protection, not removing access.
What you'll do
- Set the sticky bit on /shared so users can only delete their own files
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
