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?
Asked
Active
Viewed 824 times
5

martin
- 355
- 1
- 7
- 15
1 Answers
8
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.

cuonglm
- 2,386
- 2
- 16
- 20
-
Ou, sorry I didn't mention I'm using OS X but you gave a good hint and I found `dtruss` http://stackoverflow.com/questions/1925978/equivalent-of-strace-feopen-command-on-mac-os-x – martin Jul 08 '13 at 09:36