Practice & Assessment
Test your understanding of Module 4: Permissions, Users, and Groups
Multiple Choice Questions
5What does the permission value 755 mean in Linux?
Which command adds an existing user to a supplementary group without removing them from other groups?
Where are encrypted user passwords stored on a Linux system?
What does chmod +x filename do?
Which command should be used to safely edit the sudoers file?
Coding Challenges
1User, Group, and Permission Management
Perform the following tasks as root or with sudo: Create a new group called devteam. Create a new user called devuser with a home directory and bash shell, and set their password. Add devuser to the devteam group. Create a directory called /opt/devproject and set its owner to devuser and group to devteam. Set the directory permissions to 775. Create a file inside called README.txt and set its permissions to 664. Verify all permissions with ls -la /opt/devproject.
Mini Project
Multi-User Project Environment Setup
Set up a shared project environment. Create a group called webteam. Create two users โ webdev1 and webdev2 โ each with a home directory and bash shell, and add both to the webteam group. Create a shared directory at /srv/webapp with ownership set to root:webteam and permissions 2775 (the 2 sets the setgid bit so new files inherit the group). Inside /srv/webapp, create subdirectories: public, private, and logs. Set /srv/webapp/private to permissions 770 so only webteam members can access it. Set /srv/webapp/public to 775. Test that webdev1 and webdev2 can write to /srv/webapp/public by switching users with su and creating test files. Verify all permissions with ls -la /srv/webapp.
