nerdexam
CompTIA

XK0-004 · 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)…

Security

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

(32 responses)
  • B
    3% (1)
  • C
    6% (2)
  • D
    91% (29)

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

#setgid#chmod#group permissions#special bits

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice