Information Technology Specialist (ITS) Cybersecurity 2025 – 400 Free Practice Questions to Pass the Exam

Question: 1 / 400

What command would you use to remove write and execute permissions for all users except the file's owner in Linux?

chmod 755 filename

chmod 644 filename

chmod og-wx filename

The command that effectively removes write and execute permissions for all users except the file's owner is achieved through the use of `chmod og-wx filename`. This command specifies to remove the write and execute permissions (denoted by 'w' and 'x') for "others" (`o`) and "group" (`g`) while leaving the owner permissions intact.

In Linux file permissions, there are three categories of users: the file owner, the group associated with the file, and others (everyone else). The file owner typically has the highest level of control over the file, and the command in question modifies permissions specifically for the users who are not the owner. By advising `og-wx`, you are instructing the system to not allow write and execute access to the group and other users, thereby tightening security around the file while maintaining full access for the file's owner.

Looking at the other options, they do not meet the requirement laid out in the question. For example, `chmod 755 filename` grants write and execute permissions to the owner, while also giving read and execute permissions to the group and others, which does not restrict access as required. Similarly, `chmod 644 filename` allows the owner to read and write, and provides

Get further explanation with Examzify DeepDiveBeta

chmod 700 filename

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy