Suggested Answer:See explanation below.
chmod g+s /archive Verify using: ls -ld /archive Permission should be like: drwxrws--- 2 root sysuser 4096 Mar 16 18:08 /archive If SGID bit is set on directory then who every users creates the files on directory group owner automatically the owner of parent directory. To set the SGID bit: chmod g+s directory To Remove the SGID bit: chmod g-s directory
#Create a Directory
mkdir archive
#Set the GUID
chmod g+s archive
Now any file or folder created in the archive will have the same owner:group permissions as parent folder, in this case same as archive folder
Say we got data dir under home, so:
chmod g+s data
tar cvf backup.tar data
upvoted 1 times
...
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.
cloudyhr
6 months, 2 weeks agoSTFN2019
9 months, 4 weeks ago