Which of the following commands will allow the users access to the files?

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?
A . chattr
B . chgrp
C . chage
D . chcon

Answer: B

Explanation:

The chgrp command is used to change the group ownership of files and directories. By using this command, the administrator can assign the files in the newly created directory to the human resources group, which will allow the users in that group to access them. The other commands are not relevant for this task.

For example:

chattr is used to change the file attributes, such as making them immutable or append-only1.

chage is used to change the password expiration information for a user account2.

chcon is used to change the security context of files and directories, which is related to SELinux3.

References:

The CompTIA Linux+ Certification Exam Objectives mention that the candidate should be able to “manage file and directory ownership and permissions” as part of the Hardware and System Configuration domain4.

The web search result 2 explains how to use the chgrp command with examples.

The web search result 3 compares the chmod and chgrp commands and their effects on file permissions.

Latest XK0-005 Dumps Valid Version with 136 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments