Q: 2
Users in the human resources department are trying to access files in a newly created directory.
Which of the following commands will allow the users access to the files?
Options
Discussion
Option B, not D. chgrp is for group ownership, D is about SELinux which isn’t the default context here.
B , chgrp is needed for group access to the directory. No SELinux mention so D doesn't fit.
My vote is B, had something like this in a mock. chgrp is what gives HR users access.
B. chgrp is the right pick here since it changes the group ownership for the files or directory. That way, HR users can get access as long as they're in the correct group. Pretty sure none of the other commands deal directly with group permissions.
Not sure why some pick D, but unless SELinux was specifically mentioned it should be B. chgrp changes group ownership, which is the basic fix here. D is a common trap if you're thinking security context.
Group ownership is the key here, so B. Only flip to D if the question said anything about SELinux context messing with access, but it just says regular directory permissions. Pretty sure that's correct but open if anyone sees a trick detail I missed.
B for sure. chgrp is what updates the group ownership so HR can access the files, unless there’s an SELinux context issue but nothing in the question mentions that. I think B is solid but happy for someone to point out if I’m missing something niche.
Maybe D. Nice clear question format, seen similar on practice exams.
Be respectful. No spam.