Intermediate · 5 missions
Users & permissions — Linux terminal practice
Read rwx permissions, make scripts runnable, protect private files and check your user and groups.
Missions in this track
rwx permissions, chmod aur apne files ko private rakhna.
-
1
Read permissions
Show the permissions of the files in
~/scripts.Show the command
ls -l ~/scripts-rw-r--r--= owner can read+write, group and others can only read. -
2
Make it runnable
~/scripts/backup.shis not executable. Give it execute permission.Show the command
chmod +x ~/scripts/backup.shWithout the x bit you get "Permission denied" when you try to run a script.
-
3
Run it
Run the backup script.
Show the command
~/scripts/backup.sh./filemeans "the file in this folder". Linux does not look in the current folder by itself. -
4
Keep it private
Make
~/notes/todo.txtreadable and writable only by you (600).Show the command
chmod 600 ~/notes/todo.txtr=4, w=2, x=1. 600 = rw for owner only. SSH keys must be 600 or ssh refuses to use them.
-
5
Your groups
Show your user id and the groups you belong to.
Show the command
idBeing in the
sudogroup means you can become root.