nerdexam
CompTIA

XK0-005 · Question #96

A Linux administrator needs every new file created on a directory to maintain the group permissions of the same directory. Which of the following commands would satisfy this requirement?

The correct answer is D. chmod g+s <directory>. "chmod g+s <directory>" is equal to "setgid <directory>" This means that all NEW files (only new files and subdirectories) will have the same group of the directory that contains new files (rather of group of user made the file)…

System Management

Question

A Linux administrator needs every new file created on a directory to maintain the group permissions of the same directory. Which of the following commands would satisfy this requirement?

Options

  • Achmod o+s <directory>
  • Bchmod u+s <directory>
  • Cchmod +s <directory>
  • Dchmod g+s <directory>

How the community answered

(34 responses)
  • A
    3% (1)
  • C
    3% (1)
  • D
    94% (32)

Explanation

"chmod g+s <directory>" is equal to "setgid <directory>" This means that all NEW files (only new files and subdirectories) will have the same group of the directory that contains new files (rather of group of user made the file) https://unix.stackexchange.com/questions/182212/chmod-gs-command

Topics

#Linux Permissions#chmod#setgid#Directory Management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice