nerdexam
CompTIA

XK0-005 · Question #508

An administrator attempts to rename a file on a server but receives the following error. The administrator then runs a few commands and obtains the following output: Which of the following commands…

The correct answer is D. chmod -t files. The command that the administrator should run NEXT to allow the file to be renamed by any user is chmod -t files. This command uses the chmod tool, which is used to change file permissions and access modes. The -t option removes (or sets) the sticky bit on a directory, which…

System Management

Question

An administrator attempts to rename a file on a server but receives the following error. The administrator then runs a few commands and obtains the following output:

Which of the following commands should the administrator run NEXT to allow the file to be renamed by any user?

Options

  • Achgrp reet files
  • Bchacl -R 644 files
  • Cchown users files
  • Dchmod -t files

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    5% (2)
  • C
    11% (4)
  • D
    81% (30)

Explanation

The command that the administrator should run NEXT to allow the file to be renamed by any user is chmod -t files. This command uses the chmod tool, which is used to change file permissions and access modes. The -t option removes (or sets) the sticky bit on a directory, which restricts deletion or renaming of files within that directory to only their owners or root. In this case, since files is a directory with sticky bit set (indicated by t in drwxrwxrwt), removing it will allow any user to rename or delete files within that directory.

Topics

#Linux Permissions#Sticky Bit#chmod command#Directory Management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice