I'm running a script that makes some changes to the contents of a file then resets its modification time to what it was before. Intermittently, I'll find the following errors in my log:
touch() [function.touch]: Utime failed: Operation not permitted
This on the line immediately after a file_put_contents()
call appears to have changed the contents of the file I tried to touch()
. There are no errors associated with the file_put_contents()
line.
Has anyone had this happen? Can anyone figure out what set of permissions would allow me to write a file but not change its modification time? I'm doing this on Linux.