In the following week of your training, you will learn how to set up users and permissions on both Windows and Linux operating systems. As an IT Support Specialist, you would learn how to grant appropriate permissions to users and groups. By the end of the module, you will have the means to use the Windows GUI, Windows CLI, and Linux shell to add, modify, and delete users, and manage permissions on individual files and folders.
Learning Objectives:
- Grant appropriate permissions to users and groups.
- Add, modify, and remove users on a computer.
- Add, modify, and remove permissions on files and folders.
PRACTICE QUIZ: PERMISSIONS
1. What are the basic linux file permissions? Check all that apply.
- Read (CORRECT)
- Write (CORRECT)
- Modify
- Execute (CORRECT)
Great job! Reading, writing, and execution are the three basic file permissions for everyone’s use in Linux.
2. You’re given the output of an ls -l of a file in Linux.
1 ls -l books_file
2
3 dr-x-wxr-- 1 phelan cool_group 0 Aug 20 11:10 books_file
Answer the following question: What does the first character of output signify?
- books_file is a directory (CORRECT)
- The file owner has delete permissions
- books_file is a disk device
- The file owner is a class D user
Awesome work! The first character in the output denotes the kind of directory entry. For example, when set to d, it denotes a directory.
3. You’re given the output of an ls -l of a file in Linux.
1 ls -l books_file
2
3 dr-x-wxr-- 1 phelan cool_group 0 Aug 20 11:10 books_file
Answer the following question: Who does the last trio of bits (r–) in the file permission and attributes refer to?
- File owner
- Group file belongs to (CORRECT)
- Regular file
- All other users
Great job! The permission bits in the last set depict the permissions granted to all other users in the system.
4. You’re given the output of an ls -l of a file in Linux.
1 ls -l books_file
2
3 dr-x-wxr-- 1 phelan cool_group 0 Aug 20 11:10 books_file
Answer the following question: What permissions does the second trio of bits (-wx) give you? Check all that apply.
- Execute (CORRECT)
- Read
- Write (CORRECT)
- Group file belongs to
Great work! ‘W’ represents a write permission while ‘x’ signifies an execute permission. permissions.
5. If I wanted to change permissions of a file called honey_bears, what command could I use to grant write access to the owner of the file without changing other permissions? The owner currently only has read access to the file. Check all that apply.
- chmod u+w honey_bears (CORRECT)
- chmod o+w honey_bears
- chmod 644 honey_bears
- chmod 400 honey_bears
You nailed it! Changing permissions can be done using either the symbolic or the numerical form of chmod, but to avoid the accidental changing of permissions with the numerical form, it is important to know the current permissions.
6. A(n) _____ is a user who has complete control over a machine.
- local
- domain
- standard
- administrator (CORRECT)
Nice job! An administrator has unlimited access privileges and performs the management of an average user on a machine.
7. Users that are categorized together by levels of access and permissions are added to _____.
- groups (CORRECT)
- directories
- domains
- files
You got it! Management and maintenance could be simplified by combining users with the same access and permission levels.
8. What’s the name of the first user that gets created on a Linux machine, the OS superuser?
- admin
- root (CORRECT)
- superuser
- administrator
Wohoo! The first of the users created on a Linux machine is usually that of the root user.
9. Which special permission bit is used to allow a file to be run as the owner of the file?
- SetUID (CORRECT)
- SetGID
- Sticky bit
- Super bit
Great job! When applied, the SetUID bit makes it possible for a file to be executed with the permissions owned by the owner of that file.
10. Which special permission bit is used to allow a file to be written to by anyone, but only removable by the owner or root?
- SetUID
- SetGID
- Sticky bit (CORRECT)
- Read
Wohoo! In the unlikely event that someone wants to cause mischief with the considered file, this sticky bit can prevent deletion by everyone except the owner and root users.