If not hard wired, try printing out the arguments supplied to
os.utime() at time call being made to make sure valid. Ensure the path
is actually absolute and not relative as working directory under
Apache could be anything. Also print out os.geteuid() and os.getgid()
to make sure they are what you think they should be. If on a Linux box
see if SELinux extensions enabled.
Graham