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…
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)- A3% (1)
- B5% (2)
- C11% (4)
- D81% (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
Community Discussion
No community discussion yet for this question.