In: Computer Science
Note: You do not have to provide specific commands, just a short description will suffice.
Hint: Answer the following question: Will such the system run programs compiled by the ordinary users? (Explain your answer.) Specifically, what rule will be used to allow or deny it?
Answer 1)
In order to achieve this problem, at first we can create a group; add the user Bob to that particular group and then change the ownership of that file to the specific user and later at the end, we can give the user 'Bob' particular read permissions so that he can read it and me as being a superuser has access to that file too.
Commands to be used:
So to achieve this, we first create a group by using the command:
addgroup NewGroup
Then we add Bob of that group
usermod -G NewGroup Bob
Then we change the file permissions to allow read access to the members of the NewGroup group.
chgrp Bob /home/alice/foo
chmod 400 /home/alice/foo
This file will remain owned by super user, but be readable by Bob and not by the other users.
Note: Since we have given limited time to solve the question, So I have solved 1, please upload remaining separately.