Linux track all files accessed by process?
Try doing this as a starter :
lsof -p <PID>
this command will list all opened files, fd, sockets...
For your special needs, see what I can offer as a solution to monitor a php script :
php foo.php & _pid=$!
lsof -r1 -p $_pid
kill %1 # if you want to kill php script
As a better alternative, I recommend the use of strace
:
strace -f -t -e trace=file php foo.php
or for an already running process :
strace -f -t -e trace=file -p <PID>