View Single Post
Old 03-16-2012, 05:09 PM  
Zverka
Confirmed User
 
Zverka's Avatar
 
Join Date: Jun 2005
Location: EU
Posts: 278
Quote:
Originally Posted by _Lush_ View Post
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
__________________
Zverka is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote