Lab 5 Users & Permissions
Lab 5 Users & Permissions
MIT416 – Linux I
Modified by: Franco Iacobacci W2020 Page 1
St. Clair College of Applied Arts and Technology
MIT416 – Linux I
7. Run gpasswd -a studentx students this will add the user studentx to the students group.
8. Now add studentx to the tux group using gpasswd
Part 4: Directory Permissions [3 Marks]
1. Create a folder called /lab6.4
2. Now do an ls -l / Who are the user and group owners of /lab6.4? ___________ ______________
3. What are the directory permissions on /lab6.4? _______________________
4. Now switch user to the user account created in part 1.2.
5. Then change directory to /lab6.4 Was that successful? ______
6. Now press Ctrl + D to logout of the user.
7. Now while logged in as root change the directory permissions to 750 using the chmod command.
8. What are the permissions on /lab6.4 now? _____________
9. Switch back to your user made in part 1.2. Can you change directory to /lab6.4 now? ____________
10. Logout of your user again.
11. Now change the group owner of /lab6.4 to tux using chown :tux /lab6.4
12. Now change user back to the one created in part 1.2, can you change directory to /lab6.4? _________
13. Why? ___________________________________________
14. Now try to create a file by running echo “hello” >> /lab6.4/hello.txt from your user account
15. Was it successful? __________________
16. Now log out of your account and change the permissions to 770 on /lab6.4
17. Now try to create a file again from your user account and it should be successful. Why? ____________
HAVE YOU INSTRUCTOR MARK YOU LAB, THEN SHUTDOWN YOUR VIRTUAL MACHINE
MIT416 – Linux I
Modified by: Franco Iacobacci W2020 Page 2