On Fri, Nov 21, 2003 at 01:10:28PM -0500, Rodney Green wrote: : Marek Kilimajer wrote: : >Rodney Green wrote: : >> : >>I'm writing a script that downloads a tarball from an FTP server and : >>unpacks it into a directory. Here's the line of code that does this. : >> : >>exec("tar -C /scripts/ -zxv --preserve-permissions -f " . : >>"/scripts/mailfiles.tar.gz") or die('Tar failed!'); : >> : >>My problem is that the files' ownership is changed when the tarball : >>is unpacked. I'm executing the script from a web browser and Apache : >>is running as the user "apache" so the files are unpacked and : >>ownership given to the user apache. How can I make it so the files : >>will keep the original ownerships? This is important because the : >>files are mail files and the script is used to restore the mail files : >>from backup so the users can access them. : > : >Only root can change file ownership. : : Thanks for replying. Any suggestions on how to do this then?
sudo? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php