Linux Training Videos – Essentials Part 2/2 for DevOps Engineers
Disclaimer Copyrights for below content belongs to MFH. Videos are uploded to MFH Youtube channel and made them unlisted or not accessable to public. We use youtube to have better controls on the video.
Lesson Notes
whoami – get know which user you are in
su root – by using this command we can switch user from one user to other but we should know crendintials.so we will not be able switch another user
Sudo is superuser do as it will be switching user without credentials
we will use this – Sudo su root
Cal and date are commands, by using this we can see calendar and date
they are3 types of users
1)owner
2)group
3)others
we will be giving the permissions to these 3 users by using chmod command
to give permission we will follow the numeric and aliphatic order
3 types of permissions are Available
they are
r – read w – write x – execute
so, we have total 9 columns for single file like this
owner group others
— — —
rwx rwx rwx
we follow the numeric number
r = 4 w = 2 x = 1
we need to calculate this number for giving permissions to 3 types of users
we using chmod 777 f1 then it will give read, write and execute permissions to owner, group and others
exp: chmod 777
Owner group others
rwx rwx rwx
4+2+1 4+2+1 4+2+1
7 7 7
alphabetical notations
———————–
It is another type of method to change permissions. here we can take 1 letter from the 3 users
users
owner———-u
group———-g
others———o
we can denote the
“u” denotes the owner user
“g” denotes the group user
“o” denotes the others user
so, we need to use these letters to change permissions of files.
two symbols also we will use in changing permissions
Addition and subtraction
“+” addition symbol is used to add permission to file.
“-” subtraction symbol is used to removing the permissions to file.
+ = adding permissions
– = removing the permissions
here we can change the permission by using alphabetic order.
Here we will
1)removing the OWNER{X} executing permission from user
2) no change in group permissions
3)adding READ{R} PERMISIONS from others user
then we will get this format
example: –
rwx rw ec2-user ec2-user file1 >>>>>>>>> rw rw r
— — — — — —
After changing the alphabetic permissions
rwx rw r ec2-user ec2-user file1 >>>>>>>>> rw rw r === chmod u-x,o+r
— — — — — —
chmod=x for replacing the older permissions