UNIX MCQs – Permissions and Ownership (Part – 3)

UNIX Question and Answer – Permissions and Ownership

UNIX MCQ – Multiple Choice Questions for exam, interview, and Entrance Test

1. In UNIX, what does the command “chmod u+x file.txt” do?

a) Adds execute permission to the owner of the file

b) Adds execute permission to the group of the file

c) Adds execute permission to others

d) Adds execute permission to all users

Answer: a) Adds execute permission to the owner of the file

Explanation: The command “chmod u+x file.txt” adds execute permission to the owner of the file in UNIX.


2. Which command is used to change the permissions of a symbolic link itself rather than the target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: a) chmod -h

Explanation: The chmod -h command is used to change the permissions of a symbolic link itself rather than the target file in UNIX.


3. In UNIX, what does the command “chmod g+w file.txt” do?

a) Adds write permission to the owner of the file

b) Adds write permission to the group of the file

c) Adds write permission to others

d) Adds write permission to all users

Answer: b) Adds write permission to the group of the file

Explanation: The command “chmod g+w file.txt” adds write permission to the group of the file in UNIX.


4. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -l

b) chmod +l

c) chmod -h

d) chmod +h

Answer: b) chmod +l

Explanation: The chmod +l command is used to change the permissions of a symbolic link’s target file in UNIX.


5. In UNIX, what does the command “chmod o-r file.txt” do?

a) Removes read permission from the owner of the file

b) Removes read permission from the group of the file

c) Removes read permission from others

d) Removes read permission from all users

Answer: c) Removes read permission from others

Explanation: The command “chmod o-r file.txt” removes read permission from others in UNIX.


6. Which command is used to change the permissions of a symbolic link’s target file rather than the symbolic link itself in UNIX?

a) chmod -l

b) chmod +l

c) chmod -h

d) chmod +h

Answer: d) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file rather than the symbolic link itself in UNIX.


7. In UNIX, what does the command “chmod u=rw,go=r file.txt” do?

a) Sets read and write permissions for the owner, and read-only permissions for others

b) Sets read-only permissions for the owner and group, and no permissions for others

c) Sets read and write permissions for the owner, and no permissions for others

d) Sets read and write permissions for all users

Answer: a) Sets read and write permissions for the owner, and read-only permissions for others

Explanation: The command “chmod u=rw,go=r file.txt” sets read and write permissions for the owner, and read-only permissions for others in UNIX.


8. Which command is used to change the permissions of a symbolic link’s target file rather than the symbolic link itself in UNIX?

a) chmod -l

b) chmod +l

c) chmod -h

d) chmod +h

Answer: d) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file rather than the symbolic link itself in UNIX.


9. In UNIX, what does the command “chmod ugo+rwx file.txt” do?

a) Grants read, write, and execute permissions to the owner, group, and others

b) Adds read, write, and execute permissions to the owner, group, and others

c) Removes read, write, and execute permissions from the owner, group, and others

d) Sets read, write, and execute permissions for the owner, and read-only permissions for the group and others

Answer: b) Adds read, write, and execute permissions to the owner, group, and others

Explanation: The command “chmod ugo+rwx file.txt” adds read, write, and execute permissions to the owner, group, and others in UNIX.


10. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


11. In UNIX, what does the command “chmod a=r file.txt” do?

a) Sets read-only permissions for all users

b) Adds read-only permissions for all users

c) Removes read-only permissions for all users

d) Sets read and write permissions for all users

Answer: a) Sets read-only permissions for all users

Explanation: The command “chmod a=r file.txt” sets read-only permissions for all users in UNIX.


12. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


13. In UNIX, what does the command “chmod u=rw,go= file.txt” do?

a) Sets read and write permissions for the owner, and no permissions for others

b) Sets read-only permissions for the owner and group, and no permissions for others

c) Sets read and write permissions for the owner, and read-only permissions for others

d) Sets read and write permissions for all users

Answer: a) Sets read and write permissions for the owner, and no permissions for others

Explanation: The command “chmod u=rw,go= file.txt” sets read and write permissions for the owner, and no permissions for others in UNIX.


14. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


15. In UNIX, what does the command “chmod a=rwx file.txt” do?

a) Sets read, write, and execute permissions for all users

b) Adds read, write, and execute permissions for all users

c) Removes read, write, and execute permissions for all users

d) Sets read, write, and execute permissions for the owner, and read-only permissions for the group and others

Answer: a) Sets read, write, and execute permissions for all users

Explanation: The command “chmod a=rwx file.txt” sets read, write, and execute permissions for all users in UNIX.


16. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


17. In UNIX, what does the command “chmod u=rw,go=r file.txt” do?

a) Sets read and write permissions for the owner, and read-only permissions for others

b) Sets read-only permissions for the owner and group, and no permissions for others

c) Sets read and write permissions for the owner, and no permissions for others

d) Sets read and write permissions for all users

Answer: a) Sets read and write permissions for the owner, and read-only permissions for others

Explanation: The command “chmod u=rw,go=r file.txt” sets read and write permissions for the owner, and read-only permissions for others in UNIX.


18. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


19. In UNIX, what does the command “chmod a=rx file.txt” do?

a) Sets read and execute permissions for all users

b) Adds read and execute permissions for all users

c) Removes read and execute permissions for all users

d) Sets read and execute permissions for the owner, and read-only permissions for the group and others

Answer: a) Sets read and execute permissions for all users

Explanation: The command “chmod a=rx file.txt” sets read and execute permissions for all users in UNIX.


20. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


21. In UNIX, what does the command “chmod u=rwx,go= file.txt” do?

a) Sets read, write, and execute permissions for the owner, and removes all permissions for others

b) Sets read and write permissions for the owner, and removes all permissions for others

c) Sets execute permission for the owner, and removes all permissions for others

d) Sets read permission for the owner, and removes all permissions for others

Answer: a) Sets read, write, and execute permissions for the owner, and removes all permissions for others

Explanation: The command “chmod u=rwx,go= file.txt” sets read, write, and execute permissions for the owner, and removes all permissions for others in UNIX.


22. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


23. In UNIX, what does the command “chmod g= file.txt” do?

a) Removes all permissions for the group

b) Sets read and execute permissions for the group

c) Sets read and write permissions for the group

d) Sets execute permission for the group

Answer: a) Removes all permissions for the group

Explanation: The command “chmod g= file.txt” removes all permissions for the group in UNIX.


24. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


25. In UNIX, what does the command “chmod o=w file.txt” do?

a) Removes write permission for others

b) Sets write permission for others

c) Removes all permissions for others

d) Sets read and write permissions for others

Answer: b) Sets write permission for others

Explanation: The command “chmod o=w file.txt” sets write permission for others in UNIX.


26. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


27. In UNIX, what does the command “chmod u=r file.txt” do?

a) Sets read permission for the owner

b) Removes read permission for the owner

c) Sets write permission for the owner

d) Removes write permission for the owner

Answer: a) Sets read permission for the owner

Explanation: The command “chmod u=r file.txt” sets read permission for the owner in UNIX.


28. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


29. In UNIX, what does the command “chmod g=x file.txt” do?

a) Sets execute permission for the group

b) Removes execute permission for the group

c) Sets read permission for the group

d) Removes read permission for the group

Answer: a) Sets execute permission for the group

Explanation: The command “chmod g=x file.txt” sets execute permission for the group in UNIX.


30. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


31. In UNIX, what does the command “chmod o-rwx file.txt” do?

a) Removes read, write, and execute permissions for others

b) Sets read, write, and execute permissions for others

c) Removes execute permission for others

d) Sets execute permission for others

Answer: a) Removes read, write, and execute permissions for others

Explanation: The command “chmod o-rwx file.txt” removes read, write, and execute permissions for others in UNIX.


32. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


33. In UNIX, what does the command “chmod a=rw file.txt” do?

a) Sets read and write permissions for all users

b) Removes read and write permissions for all users

c) Sets read and write permissions for the owner and group, and read-only permissions for others

d) Sets read and write permissions for the owner, and read-only permissions for others

Answer: a) Sets read and write permissions for all users

Explanation: The command “chmod a=rw file.txt” sets read and write permissions for all users in UNIX.


34. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


35. In UNIX, what does the command “chmod u=rwx,go= file.txt” do?

a) Sets read, write, and execute permissions for the owner, and removes all permissions for others

b) Sets read and write permissions for the owner, and removes all permissions for others

c) Sets execute permission for the owner, and removes all permissions for others

d) Sets read permission for the owner, and removes all permissions for others

Answer: a) Sets read, write, and execute permissions for the owner, and removes all permissions for others

Explanation: The command “chmod u=rwx,go= file.txt” sets read, write, and execute permissions for the owner, and removes all permissions for others in UNIX.


36. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


37. In UNIX, what does the command “chmod g= file.txt” do?

a) Removes all permissions for the group

b) Sets read and execute permissions for the group

c) Sets read and write permissions for the group

d) Sets execute permission for the group

Answer: a) Removes all permissions for the group

Explanation: The command “chmod g= file.txt” removes all permissions for the group in UNIX.


38. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


39. In UNIX, what does the command “chmod o=w file.txt” do?

a) Removes write permission for others

b) Sets write permission for others

c) Removes all permissions for others

d) Sets read and write permissions for others

Answer: b) Sets write permission for others

Explanation: The command “chmod o=w file.txt” sets write permission for others in UNIX.


40. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


41. In UNIX, what does the command “chmod u=r,g=w,o=x file.txt” do?

a) Sets read permission for the owner, write permission for the group, and execute permission for others

b) Sets read permission for the owner, write permission for the group, and no permissions for others

c) Sets read permission for the owner, execute permission for the group, and write permission for others

d) Sets read permission for the owner, execute permission for the group, and no permissions for others

Answer: b) Sets read permission for the owner, write permission for the group, and no permissions for others

Explanation: The command “chmod u=r,g=w,o=x file.txt” sets read permission for the owner, write permission for the group, and no permissions for others in UNIX.


42. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


43. In UNIX, what does the command “chmod a=rwx,u-x file.txt” do?

a) Sets read, write, and execute permissions for all users, and removes execute permission for the owner

b) Sets read, write, and execute permissions for all users, and removes execute permission for others

c) Sets read, write, and execute permissions for all users, and removes execute permission for the group

d) Sets read, write, and execute permissions for all users, and removes execute permission for the owner, group, and others

Answer: a) Sets read, write, and execute permissions for all users, and removes execute permission for the owner

Explanation: The command “chmod a=rwx,u-x file.txt” sets read, write, and execute permissions for all users, and removes execute permission for the owner in UNIX.


44. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


45. In UNIX, what does the command “chmod u=rwx,g=rx,o= file.txt” do?

a) Sets read, write, and execute permissions for the owner, read and execute permissions for the group, and no permissions for others

b) Sets read, write, and execute permissions for the owner, read and execute permissions for the group, and write permission for others

c) Sets read, write, and execute permissions for the owner, read and execute permissions for the group, and read permission for others

d) Sets read, write, and execute permissions for the owner, read and execute permissions for the group, and execute permission for others

Answer: a) Sets read, write, and execute permissions for the owner, read and execute permissions for the group, and no permissions for others

Explanation: The command “chmod u=rwx,g=rx,o= file.txt” sets read, write, and execute permissions for the owner, read and execute permissions for the group, and no permissions for others in UNIX.


46. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


47. In UNIX, what does the command “chmod a=r,g=w,o=x file.txt” do?

a) Sets read permission for all users, write permission for the group, and execute permission for others

b) Sets read permission for all users, write permission for the group, and no permissions for others

c) Sets read permission for all users, execute permission for the group, and write permission for others

d) Sets read permission for all users, execute permission for the group, and no permissions for others

Answer: b) Sets read permission for all users, write permission for the group, and no permissions for others

Explanation: The command “chmod a=r,g=w,o=x file.txt” sets read permission for all users, write permission for the group, and no permissions for others in UNIX.


48. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.


49. In UNIX, what does the command “chmod a=rwx,u-x,g= file.txt” do?

a) Sets read, write, and execute permissions for all users, removes execute permission for the owner, and sets no permissions for the group

b) Sets read, write, and execute permissions for all users, removes execute permission for the owner, and sets read permission for the group

c) Sets read, write, and execute permissions for all users, removes execute permission for the owner, and sets write permission for the group

d) Sets read, write, and execute permissions for all users, removes execute permission for the owner, and sets execute permission for the group

Answer: a) Sets read, write, and execute permissions for all users, removes execute permission for the owner, and sets no permissions for the group

Explanation: The command “chmod a=rwx,u-x,g= file.txt” sets read, write, and execute permissions for all users, removes execute permission for the owner, and sets no permissions for the group in UNIX.


50. Which command is used to change the permissions of a symbolic link’s target file in UNIX?

a) chmod -h

b) chmod +h

c) chmod -l

d) chmod +l

Answer: b) chmod +h

Explanation: The chmod +h command is used to change the permissions of a symbolic link’s target file in UNIX.

Related Articles

Linux MCQ

Welcome to Linux Multiple Choice Questions (MCQ) Section Embark on a journey through the world of...