CompTIA Linux+ Practice Questions: Permissions

8 free, exam-style CompTIA Linux+ (XK0-006) practice questions covering Permissions, each with the correct answer and an explanation. Start a timed exam below, or scroll on to read through the questions.

🧠

Mini Exam

25 Questions · 50 minutes

Start Quiz 🚀
🏆

Mock Linux+ Exam

85 Questions · 165 minutes

Start Quiz 🚀
📅

Daily Quiz

10 Questions · 20 minutes

Start Quiz 🚀
🎯

Standard Practice

50 Questions · 100 minutes

Start Quiz 🚀

Permissions practice questions

Answers and explanations are shown. Take the timed exam above to test yourself first.

Q1. Which permission allows executing a script?

  • A.Read (4)
  • B.Write (2)
  • C.Execute (1)✓ Correct
  • D.Sticky bit (1000)
Explanation: Execute permission (x) is required to run scripts. Learn more.

Q2. What does 'umask 027' set for new files?

  • A.640 (rw-r-----)✓ Correct
  • B.750 (rwxr-x---)
  • C.740 (rwxr-----)
  • D.644 (rw-r--r--)
Explanation: 027 umask subtracts permissions: 666-027=640 for files. Learn more.

Q3. Which command changes file ownership?

  • A.chmod
  • B.chown✓ Correct
  • C.chgrp
  • D.chattr
Explanation: chown modifies user/group ownership of files. Learn more.

Q4. What is the purpose of the 'sticky bit'?

  • A.Prevent file deletion by non-owners✓ Correct
  • B.Enable SUID execution
  • C.Encrypt file contents
  • D.Track file changes
Explanation: Sticky bit (t) on directories restricts file deletion to owners. Learn more.

Q5. Which file defines default umask for login shells?

  • A./etc/profile
  • B./etc/bashrc
  • C./etc/login.defs✓ Correct
  • D./etc/environment
Explanation: UMASK in /etc/login.defs sets default permissions. Learn more.

Q6. Which permission mode gives the owner read, write, and execute while group and others get read and execute?

  • A.755✓ Correct
  • B.644
  • C.600
  • D.700
Explanation: 755 maps to rwx for owner and r-x for group and others. Learn more.

Q7. Which command displays ACLs on a file?

  • A.getfacl✓ Correct
  • B.setenforce
  • C.mkfs
  • D.systemctl
Explanation: getfacl displays access control lists for files and directories. Learn more.

Q8. Which command grants user analyst read and write ACL permissions on report.txt without changing the file owner?

  • A.chmod u=analyst:rw report.txt
  • B.setfacl -m u:analyst:rw report.txt✓ Correct
  • C.chown analyst:rw report.txt
  • D.usermod -a report.txt analyst
Explanation: setfacl modifies the file access control list and can grant a named user permissions independently of the traditional owner, group, and other bits. Learn more.

More CompTIA Linux+ practice topics

Keep studying CompTIA Linux+

Full CompTIA Linux+ practice exam · CompTIA Linux+ study guide · All CompTIA practice questions

Last updated