Okay, I need to be able to clear an access-log file for one of my subdomains. I am going to have a PHP script that is run every so often using a cronjob task and it is going to read the log file and parse it and calculate how many views each image got. I then need it to empty the file so I don't recount those later. I obviously can't use file_put_contents() or similar due to it not having permission. I can't even chmod the file via FTP. Oh and this is on a dedicated server that my friend and I own so you know it's not a shared server. Any easy ideas? Thanks.
Okay, this problem is back open. Even though I can CHMOD the file to 660 through SSH, the server seems to reset it back to 640 every so often. So now my question is, what would you suggest doing to have write access to a file that only root can be owner of from a user account? Is it possible to run my PHP script through root owner in my cron job command? How would I do that?