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?
You can start process by hand, and use strace to know what files it tried to open:
Then manipulate file process.trace to determine what you want.