Question : explod a file making another user owner

I am using a web control panel but for some reason it does not have an expand feature, so i can upload a compress archive hat contains a site and then expand it in a directory.

I do have root access to this mahine, I can get the archive on the machine but i am having permission issue when i expand it as i am expanding it as root and then can change any of the files or write to directories inside the structure i have expanded.

So i am wondering what command i can use to expand the archive as say apche?

Ww

Answer : explod a file making another user owner

If the archive is tar.gz (or .tar) you can use following command:

tar -xzvf --owner apache  foo.tar.gz

If you wan tto keep permissions which comes with the uploaded archive you can use the following command:

tar -xzvfp foo.tar.gz

p = preserve permissions
Random Solutions  
 
programming4us programming4us