How do you add group write and execute permissions to myfile.txt in Linux?

Prepare for the COMPTIA A+ Exam with essential quizzes covering key topics and multiple choice questions. Boost your knowledge and readiness for achieving certification!

In Linux, permissions can be assigned to a file for the file owner, groups, and everyone else.

The chmod command is used to modify these permissions.

Options can be combined to set multiple permissions simultaneously.

In this scenario, the correct command to add group write and execute permissions to myfile.txt is "chmod g+wx myfile.txt".

Option A, "chmod g-wx myfile.txt", would only remove group write and execute permissions, but not add them.

Option B, "chmod g+x myfile.txt", would only add group execute permission, but not group write permission.

Option D, "chmod u+wx myfile.txt", would add write and execute permissions for the file owner, not for the group.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy