nerdexam
CompTIA

XK0-005 · Question #1276

A Linux administrator receives the following while attempting to remove a file: Which of the following commands will resolve the issue?

The correct answer is A. cattr -i test.txt. The error given is what the user sees when the immutable flag has been set on a file. Therefore 'chattr -i test.txt' will remove the immutable flag (remember that chattr uses - and + to turn off/on options unlike a normal command option which is only ever preceeded by a -) so…

Troubleshooting

Question

A Linux administrator receives the following while attempting to remove a file: Which of the following commands will resolve the issue?

Exhibit

XK0-005 question #1276 exhibit

Options

  • Acattr -i test.txt
  • Bsetfacl -m u:root:x test.txt
  • Cchmod -0775 test.txt
  • Dchcon -u system_u test.txt

How the community answered

(19 responses)
  • A
    79% (15)
  • B
    5% (1)
  • C
    5% (1)
  • D
    11% (2)

Explanation

The error given is what the user sees when the immutable flag has been set on a file. Therefore 'chattr -i test.txt' will remove the immutable flag (remember that chattr uses - and + to turn off/on options unlike a normal command option which is only ever preceeded by a -) so that the file can then be deleted by rm.

Topics

#File Attributes#chattr Command#Linux Filesystem#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice