122k views
4 votes
Which of the following umask settings doesn't allow execute permission to be set by default on directory files?

1) 222
2) 111
3) 0

User Ambra
by
8.7k points

1 Answer

4 votes

Final answer:

The umask setting that does not allow execute permission to be set by default on directory files is 222. Umask determines the default permission setting for newly created files and directories by subtracting its value from the system defaults.

Step-by-step explanation:

The question pertains to the Unix umask (user file-creation mode mask) which determines the default permission settings for newly created files and directories. The umask value is a three-digit octal number that controls how file permissions are set for newly created files and directories.

In Unix-based systems, the default permissions for directories are 777 (read, write, and execute for owner, group, and others) and for files are typically 666 (read and write for owner, group, and others). The umask subtracts permissions from these defaults.

A umask of 222 will result in default permissions of 555 for directories and 444 for files, meaning that read and execute permissions are set, but write permission is not. A umask of 111 will result in default permissions of 666 for directories and 666 for files, which will not restrict any permissions except the execute. A umask of 0 will result in the full default permissions of 777 for directories and 666 for files, thereby not subtracting any permissions at all.

Therefore, to answer the question, the umask setting that doesn't allow execute permission to be set by default on directory files is 222.

User Felix Wienberg
by
7.6k points