exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 22 discussion

Actual exam question from CompTIA's XK0-005
Question #: 22
Topic #: 1
[All XK0-005 Questions]

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?

  • A. chgrp reet files
  • B. chacl -R 644 files
  • C. chown users files
  • D. chmod -t files
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
linux_admin
Highly Voted 1 year, 5 months ago
You can use the chmod command with the -t option to remove the sticky bit: chmod -t /path/to/directory You cannot remove a sticky bit from a file directly. The sticky bit is a property of a directory, not a file. When a sticky bit is set on a directory, it affects the behavior of file deletion within that directory. A file within a directory with a sticky bit set cannot be deleted by a user who does not have write permissions to the directory, regardless of the permissions on the file itself. Therefore, to remove a sticky bit, you need to use the path to the directory for which you want to remove the sticky bit, not a file within the directory.
upvoted 5 times
...
Alizadeh
Most Recent 11 months, 2 weeks ago
Selected Answer: D
The correct answer is D. chmod -t files
upvoted 1 times
...
ryanzou
1 year, 9 months ago
Selected Answer: D
D is correct
upvoted 2 times
...
Aamm033
1 year, 9 months ago
Selected Answer: D
D is correct the directory has Sticky bit on. in the first ls -ld you can see the "t" instead of an "x"
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...