nerdexam
CompTIA

XK0-005 · Question #1618

The group owner of the /home/test directory would like to preserve all group permissions on files created in the directory. Which of the following commands should the group owner execute?

The correct answer is A. chmod g+s /home/test. This command will set the setgid bit on the /home/test directory, which means that any file or subdirectory created in the directory will inherit the group ownership of the directory. This way, the group permissions on files created in the directory will be preserved. The chmod…

System Management

Question

The group owner of the /home/test directory would like to preserve all group permissions on files created in the directory. Which of the following commands should the group owner execute?

Options

  • Achmod g+s /home/test
  • Bchgrp test /home/test
  • Cchmod 777 /home/test
  • Dchown -hR test /home/test

How the community answered

(41 responses)
  • A
    90% (37)
  • B
    2% (1)
  • C
    5% (2)
  • D
    2% (1)

Explanation

This command will set the setgid bit on the /home/test directory, which means that any file or subdirectory created in the directory will inherit the group ownership of the directory. This way, the group permissions on files created in the directory will be preserved. The chmod command is used to change the permissions of files and directories. The g+s option is used to set the setgid bit for the group.

Topics

#Linux permissions#chmod command#setgid bit#filesystem management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice