Which umask value ensures that new directories can be read, written and listed by their owning user, read and listed by their owning group, and are not accessible at all for everyone else?

Prepare for the LPI 101-500 Certification Exam. Utilize flashcards, navigate multiple choice questions, and benefit from hints and explanations. Begin your Linux certification journey today!

The umask value determines the default permission settings for newly created files and directories in Linux. When considering the permissions specified in the question—where the owner has full access (read, write, and execute), the group can read and list, and others have no access—we can analyze how the umask value affects this.

In this context, the permissions represented in octal form translate to:

  • Owner: read (4) + write (2) + execute (1) = 7

  • Group: read (4) + no write (0) + no execute (0) = 5

  • Others: no permissions = 0

This results in the desired permission setting of 750 for directories. The umask value subtracts permissions from the maximum default permissions, which for a directory is 777 (rwx for owner, group, and others).

To achieve the permission outcome of 750, the umask must block the permissions so that it results in:

  • Default permissions (777) - umask = Final permissions (750)

Looking at umask values, a umask of 027 will block write permissions for the group (2 from the group) and all permissions for others (7), thus resulting in:

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy