Zverka |
03-16-2012 05:09 PM |
Quote:
Originally Posted by _Lush_
(Post 18827551)
I created a php file to unpack a tar file containing wordpress. here is the code below. Problem is after running php file it is not unpacking the files under the user associated with the domain. I can only modify files or folders by logging in as super user. Anybody have better code snippet that will fix this problem.
Code:
<?php
exec('tar -xzf wordpress.tar.gz');
?>
|
You probably run php as apache mod so everything is owned to apache after unpacking it.
You need after that to chowm files and dirs back to user
chown -R user:user /home/path_to_user_account/path_to_wp_folder
I'm not expert for php but I doubt php can do it.
You need to issue that command as super user for every instance
you unpacked or make shell script for it
|