CompTIA Linux+ (XK0-004) — Question 252
Ann, a user, has created a new directory and noticed that permissions on the new directory are as follows: drwx------. 1 ann ann 0 Jun 11 08:20 work
Which of the following should the administrator do to restore default permissions for newly created directories?
Answer options
- A. Change umask value in /etc/profile.
- B. Run chmod command to update permissions.
- C. Modify directory ownership to ann:ann with chown.
- D. Execute chattr command to restore default access.
Correct answer: A
Explanation
The correct answer is A because the umask value determines the default permissions for newly created files and directories. Changing permissions with chmod (B) would only affect existing directories, not new ones. Modifying ownership with chown (C) does not impact permissions, and executing chattr (D) is used for changing file attributes, not resetting permissions.