QuestionQ22

VerifiedDevices, Linux Filesystems, Filesystem Hierarchy Standard

Consider this directory:

drwxrwxr-x 2 root sales 4096 Jan 1 15:21 sales  

Which commands ensure that new files created inside the sales directory are owned by the sales group?

Choose two
Explanation

Setting the setgid bit on a directory makes files and subdirectories created within it inherit that directory's group. Both chmod g+s sales and chmod 2775 sales set the setgid bit for the sales directory.

Community Discussion

No comments yet. Be the first to start the discussion!