Information Technology Specialist (ITS) Cybersecurity Practice Exam

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the Information Technology Specialist Cybersecurity Exam with comprehensive flashcards and multiple choice questions. Each question features helpful hints and explanations. Get confident for your exam!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


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

  1. chmod 755 filename

  2. chmod 644 filename

  3. chmod og-wx filename

  4. chmod 700 filename

The correct answer is: 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