I am writing an installation for a PHP script, and one thing that installation must do is extract all the files from an archive, sources.tar, so I use:
shell_exec("tar -xvf sources.tar");
And this works great, files are extracted with the correct structure. However, the owner of the files is such that the user of the site cannot delete the files as he does not own them, which is not going to please website owners.
Can anyone come up with a way round this?
Thanks,
Mark Carruth