Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I see the list of files open in a directory by other users? I can do "lsof +D", but that only shows current user's files. Any way to see if other users have opened files in a directory?

share|improve this question

You can't unless you are performing this as root.

If you wanted, you can setup an sudo alias for lsof, but it would either be very generic (i.e. this user can see the whole lsof output) or very specific (this user can only see this other user's lsof -u user output).

share|improve this answer

i assume you run as root / can sudo as root lsof:

lsof -u www-data
share|improve this answer
Nope, the user that's running lsof isnt (cannot be) root. However he does have rwx access to the dir and files the other user is writing to – Ash Nov 23 '09 at 9:03
@Ash - so user cannot. you can suid lsof or allow user to run it as root via sudo. but those are not good ideas. user needs to have access to /proc/processnumber to check current working dir for processes run by others. just read access to his home folder is not enough. – pQd Nov 23 '09 at 11:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.