Hi Atif, thanks for your question.
For questions involving setting permissions, you can use the options available for the chmod command. For example, for giving “execute” permission to the user, on a file called “myfile.txt” you can run the command chmod u+x myfile.txt
.
Similarly, for changing permissions for groups and others, you can use the appropriate option along with the g
and o
option.
Here are a few examples -
-
chmod u+x,g+r myfile.txt
will give execute permission to user and read permission to group on the file
-
chmod u+w,g-w,o-w myfile.txt
will give write permission to user and remove write permission from group and others.
I hope this explanation will help you in solving the exercise.
Happy Learning!