exam questions

Exam 101-500 All Questions

View all questions & answers for the 101-500 exam

Exam 101-500 topic 1 question 9 discussion

Actual exam question from LPI's 101-500
Question #: 9
Topic #: 1
[All 101-500 Questions]

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
  • B. setpol -R newgroup=sales sales
  • C. chgrp -p sales sales
  • D. chown --persistent *.sales sales
  • E. chmod 2775 sales
Show Suggested Answer Hide Answer
Suggested Answer: AE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Goena
Highly Voted 2 years, 2 months ago
A and E is correct.
upvoted 7 times
...
abc555555555
Most Recent 2 weeks, 1 day ago
Selected Answer: AE
it's AE
upvoted 1 times
...
dump_delta
4 months, 3 weeks ago
Selected Answer: AE
A. chmod g+s sales E. chmod 2775 sales
upvoted 3 times
...
Ninymo
8 months, 2 weeks ago
A. chmod g+s sales and E. chmod 2775 sales
upvoted 2 times
...
mrfstop
10 months, 2 weeks ago
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.
upvoted 3 times
...
slacked4222
1 year ago
Selected Answer: AC
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.
upvoted 1 times
slacked4222
1 year ago
Says bard and gpt
upvoted 1 times
...
...
edmiranda
1 year, 2 months ago
http://www.dba-oracle.com/t_linux_setuid_setgid_skicky_bit.htm
upvoted 2 times
...
Mlolos
1 year, 2 months ago
A and C according to chatGpt
upvoted 1 times
Parazitenew
1 year, 1 month ago
ChatGPT is wrong.
upvoted 2 times
greendiceman
8 months ago
A and C are correct. E is chmod which is used to change file permissions not ownership.
upvoted 1 times
...
...
...
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.

SaveCancel
Loading ...