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?
It sounds like you're describing the setgid bit functionality where when a directory that has it set, will force any new files created within it to have their group set to the same group that's set on the parent directory.
$ sudo mkdir --mode=u+rwx,g+rs,g-w,o-rwx somedir
$ sudo chown saml.apache somedir
$ ll -d somedir/
drwxr-s---. 2 saml apache 4096 Feb 17 20:10 somedir/
D is valid
"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
upvoted 3 times
...
This section is not available anymore. Please use the main Exam Page.XK0-004 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
DiaaEmara
2 years, 7 months agoMeisAdriano
3 years, 4 months ago