We decided to work with zip(using PclZip --> http://www.phpconcept.net/pclzip/index.php ) to export and import the folders automatically.
We are able to export the zip file and we can put a zip file from a PC to the ftp-server.
The problem is when we import the zip file and extract it on the server, we do not have write permissions on the folders.
We do have write permission on the files in these folders using this code:
Code: Select all
require_once("pclzip.lib.php"); // Read the class
$zip = new PclZip("$web_location"); //select the zip that we imported to the server
if($zip->extract(PCLZIP_OPT_SET_CHMOD, 0777) == 0) //extract the zip with permission 0777 (all users can read, write and execute the files)
die("Error : " . $zip->errorInfo(true));change/delete the content of the files. We contact the creater of this class and he says that the permission-code should also affect the folders, but it doesn't.
We also tried another method using GZip ( http://www.php.net/zlib ). We have thesame problem using this.
Would anyone know if this problem occurs because our ftp-server just can't work with this and if not, is there another way
to put folder structures from a PC to a ftp-server?