Bulk download of mails shows invalid or unsupported zip file
I am downloading a user’s mails from Piler archive console integrated with Zimbra. When I bulk download mails, the zip file downloaded shows corrupt or invalid. Here are the logs from /var/log/httpd/mailarchiver-error.log
[Tue Sep 22 01:37:49.340266 2020] [php7:warn] [pid 14986] [client 223.225.27.4:20770] PHP Warning: ZipArchive::addFromString(): Invalid or uninitialized Zip object in /var/piler/www/model/message/restore.php on line 33, referer: http://mailarchive.jakson.com/search.php
[Tue Sep 22 01:37:49.341187 2020] [php7:warn] [pid 14986] [client 223.225.27.4:20770] PHP Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /var/piler/www/model/message/restore.php on line 39, referer: http://mailarchive.jakson.com/search.php
[Tue Sep 22 01:37:49.341262 2020] [php7:warn] [pid 14986] [client 223.225.27.4:20770] PHP Warning: filesize(): stat failed for /var/piler/www/tmp/ncQsVaA3j5aEI6yu in /var/piler/www/model/message/restore.php on line 46, referer: http://mailarchive.jakson.com/search.php
[Tue Sep 22 01:37:49.341326 2020] [php7:warn] [pid 14986] [client 223.225.27.4:20770] PHP Warning: readfile(/var/piler/www/tmp/ncQsVaA3j5aEI6yu): failed to open stream: Permission denied in /var/piler/www/model/message/restore.php on line 50, referer: http://mailarchive.jakson.com/search.php
[Tue Sep 22 01:37:49.341343 2020] [php7:warn] [pid 14986] [client 223.225.27.4:20770] PHP Warning: unlink(/var/piler/www/tmp/ncQsVaA3j5aEI6yu): Permission denied in /var/piler/www/model/message/restore.php on line 52, referer: http://mailarchive.jakson.com/search.php
Piler version is 1.3.5 build 997
Pl support.
Comments (9)
-
repo owner -
reporter ls -l /var/piler/www shows at
drwxrwx---. 2 piler piler 24 Aug 14 2019 tmp
Can you pl suggest if permissions are satisfactory? Or how can I change them?
-
repo owner No. piler is not the webuser. Run something like chgrp www-data tmp or similar.
-
reporter Thanks Janos,
Issue got resolved.
There was no group like www-data but I changed permissions to 777 for /var/piler/www/tmp directory. That worked.
-
repo owner - changed status to closed
-
reporter Sir, there is still some issue left. When I surf mails for a particular user, 50 mails are shown in a single page. I can only download mails from first and second page, after that when I go to page 3 and try bulk download, error comes up saying page bulkrestore.php is invalid or address is changed. Can you pl help me out.
-
repo owner Check the web server’s error log file for a clue.
-
reporter Issue is resolved now.
In error logs, I found lack of memory to load the page.
I simply added this line in config.php
ini_set('memory_limit', '-1');
and restarted Piler service.
Thanks for your support.
-
repo owner You are welcome, nice job.
- Log in to comment
Check the permissions on /var/piler/www/tmp. The webserver must be able to write it.