TestOut Linux Pro Practice Test

Access More Questions
Which command will give write permission to the hr group for all files in the /hr directory?
Correct Answer:
chmod g+w /hr/*
Explanation:
The command that gives write permission to the hr group for all files in the /hr directory is the one that uses the `chmod` utility with the `g+w` option. This command modifies the permissions of files by adding write permissions (`w`) specifically for the group (`g`) associated with those files. The syntax `/hr/*` indicates that the command will apply to all files within the /hr directory. By using `chmod g+w`, it effectively updates the permission settings to include write access for the group's users, enabling them to make changes to the files within that directory. This is particularly useful in a collaborative environment where a specific group needs to modify shared files. The other options do not achieve this same outcome: some involve changing ownership or listing file permissions without modifying them. This makes the first choice the most appropriate for granting the required permission.

Access more questions from this quiz

Continue to TestOut Linux Pro Practice Test for more practice questions and the full quiz experience.

Access More Questions