I'm creating an install program which needs to decompress an archive and make sure all files extracted are set to the hosting account owner which is proving harder than I thought! It's my own server and only running code which I control and so I'm using apache/mod_php rather than php as CGI/FastCGI etc although I'm considering the those options given the hassle of this.
At the moment I'm using PclZip to decompress a zip file and therefore the files extracted are owned by "apache" group/user. I then tried to use chown() and chgrp() to change the file/folder ownership/group but I get the error message "Operation not permitted" for both functions.
Surely there must be an easier way to do this? Thanks in advance for any help!