Consider the following directory: drwxrwxr-x 2 root sales 4096 Jan 1 15:21 sales Which command ensures new files created within the directory sales are owned by the group sales? (Choose two.)
A. chmod g+s sales
This command sets the sticky bit (s) for the "sales" directory. The sticky bit ensures that only the owner of a file (or root) can delete or rename it, even if they belong to a different group. Additionally, any new files created within the directory will inherit the "sales" group ownership from the directory itself.
E. chmod 2775 sales
This command explicitly sets the permissions for the "sales" directory. The octal code 2775 translates to:
2: owner has Read-Write-Execute (rwx) permissions
7: group has Read-Write-Execute (rwx) permissions
5: others have Read-Execute (rx) permissions
The 7 in the second group of permissions ensures that new files created within the directory automatically inherit the "sales" group ownership.
The correct answers are A. chmod g+s sales and C. chgrp -p sales sales.
Option A: chmod g+s sales
The chmod g+s command sets the group-set-ID bit for the directory sales. This means that new files created within the directory sales will inherit the group ownership of the directory, which is sales.
Option C: chgrp -p sales sales
The chgrp -p command changes the group ownership of the directory sales and all of its files and subdirectories recursively. This means that all files currently in the directory sales and all new files created within the directory will be owned by the group sales.
Option E: chmod 2775 sales
The chmod command changes the permissions of the directory sales. However, it does not affect the group ownership of the directory.
A and C are correct. E is chmod which is used to change file permissions not ownership.
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.
Goena
Highly Voted 2 years, 2 months agoabc555555555
Most Recent 2 weeks, 1 day agodump_delta
4 months, 3 weeks agoNinymo
8 months, 2 weeks agomrfstop
10 months, 2 weeks agoslacked4222
1 year agoslacked4222
1 year agoedmiranda
1 year, 2 months agoMlolos
1 year, 2 months agoParazitenew
1 year, 1 month agogreendiceman
8 months ago