shell permissions
Lets have a look at shell permisions
chmod
sudo
su
chown
- ```chgrp`## Quizes Quiz``
id
groups
whoami
adduser
useradd
addgroup
By the end of this project, you should be able to explain to anyone Without the help of google the following concepts
- What do the commands
chmod
,sudo
,su
,chown
,chgrp
do - Linux file permissions
- How to represent each of the three sets of permissions (owner, group, and other) as a single digit
- How to change permissions, owner and group of a file
- Why can’t a normal user chown a file
- How to run a command with root privileges
- How to change user ID or become superuser
- How to create a user
- How to create a group
- How to print real and effective user and group IDs
- How to print the groups a user is in
- How to print the effective userid
- My name is Betty : A script that switches the current user to the user betty.
- Who am I : A script that prints the effective username of the current user.
- Groups : A script that prints all the groups the current user is part of.
- New owner : A script that changes the owner of the file
hello
to the userbetty
. - Empty! : A script that creates an empty file called
hello
. - Execute : A script that adds execute permission to the owner of the file
hello
. - Multiple permissions : A script that adds execute permission to the owner and the group owner, and read permission to the other users, to the file
hello
. - Everybody! : A script that adds execution permissions to the owner, the group owner and the other users, to the file
hello
. - James Bond : A script that gives the gives the rest of the users permission and removes all permission for the owner and the group owner.
- John Doe : A script that sets the mode of the file
hello
; where owner has all the permissions set, group owner has execute permissions set and others have only write and read permissions set. - Look in the mirror : A script that sets the mode of the file
hello
the same asolleh
's mode. - Directories : A script that adds execute permission to all subdirectories of the current directory for the owner, the group owner and all other users. (NB: Regular files should not be changed.)
- More directories : A script that creates a directory called
dir_holberton
with permissions 751 in the working directory. - Change group : A script that changes the group owner to
holberton
for the filehello
. - Owner and group : A script that changes the owner to
betty
and the group owner toholberton
for all the files and directories in the working directory. - Symbolic links : A script that changes the owner and the group owner of
_hello
tobetty
andholberton
respectively. - If only : A script that changes the owner of the file
hello
tobetty
only if it is owned by the userguillaume
. - Star Wars : A script that will play the StarWars IV episode in the terminal.