While they don’t come up very often, it’s important to know how to manage the special bits that can be set on files and directories. This lab will walk through some of the ways to manage them.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create the Collaborative Area
First, we need to create the directory:
mkdir /opt/managers
Then we set it so that all new files created will be owned by the
managers
group:chmod g+s /opt/managers
- Create a Scratch Area, Similar to /tmp, Named scratch
First create the directory:
mkdir /opt/managers/scratch
Then set permissions:
chmod 777 /opt/managers/scratch
Then set the Sticky Bit:
chmod o+t /opt/managers/scratch
- Configure the suid Executable
First we need to copy the executable:
cp /tmp/suid /opt/managers
Then set ownership:
chown bob.managers /opt/managers/suid
And finally we set the setUID bit:
chmod u+s /opt/managers/suid