XK0-004 · Question #360
Users are receiving permission-denied messages when trying to access a spreadsheet file within the company's file system. A Linux administrator receives a ticket and begin to investigate the following
The correct answer is D. lsof. The lsof command lists all files currently open by running processes, making it the appropriate tool when investigating file permission or access issues.
Question
Users are receiving permission-denied messages when trying to access a spreadsheet file within the company's file system. A Linux administrator receives a ticket and begin to investigate the following output:
Which of the following command would produce the presented output?
Options
- ATop
- Bnice
- Cgrep
- Dlsof
How the community answered
(36 responses)- A6% (2)
- B3% (1)
- C3% (1)
- D89% (32)
Why each option
The lsof command lists all files currently open by running processes, making it the appropriate tool when investigating file permission or access issues.
top displays a real-time view of running processes ranked by CPU and memory usage and does not show open file handles or file-level access details.
nice adjusts the scheduling priority of a process and has no function related to listing or inspecting open files.
grep searches for text patterns within file contents or command output and does not enumerate which processes have a given file open.
lsof (list open files) produces output showing every file currently held open by a process, including the process name, PID, file descriptor, and access mode, which directly helps identify which processes are accessing a file and under what permissions. When users receive permission-denied errors on a specific file, lsof output showing that file's open handles gives the administrator precise visibility into process-level access conflicts or locking issues.
Concept tested: Using lsof to investigate open files and permission errors
Source: https://man7.org/linux/man-pages/man8/lsof.8.html
Topics
Community Discussion
No community discussion yet for this question.