Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I have a process that fails on startup due to some permission issues. I want to check what files it tries to open on startup but with lsof I can list only opened files for a running process but what can I do when it fails to start?

share|improve this question
up vote 7 down vote accepted

You can start process by hand, and use strace to know what files it tried to open:

strace -f -e trace=open -o process.trace <command to start process>

Then manipulate file process.trace to determine what you want.

share|improve this answer
Ou, sorry I didn't mention I'm using OS X but you gave a good hint and I found dtruss… – Martin Jul 8 '13 at 9:36

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.