Anonymous Login
2017-01-24 04:00 CET

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
08252Bug reports[All Projects] ComfortUpdatepublic2014-02-16 18:32
Assigned Toc_schmitz 
Product Version 
Target VersionFixed in Version2.05+ 
Summary08252: The temporary file for PCLZIP is not checked for writability
DescriptionThe temporary file for the PCLZIP actions in the ComfortUpdate is not checked for writability. Therefore, the ComfortUpdate aborts with an PCLZIP_ERR_WRITE_OPEN_FAIL error, which doesn't clearly state which directory needs to be made writable.

Possible solution: The PCLZIP_TEMPORARY_DIR should be checked for writability in step 2 of the ComfortUpdate.
Additional InformationExample error:

Error message:
PCLZIP_ERR_WRITE_OPEN_FAIL (-1) : Unable to open temporary file 'pclzip-[random stuff].gz' in binary write mode.
TagsNo tags attached.
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Database & DB-Version
Operating System (Server)
Webserver software & version
PHP Version
Attached Files




jonsen (reporter)

A workaround by "dirtyhawk" from the linked thread:

chmod -R g+w /path/to/limesurvey


jonsen (reporter)

Last edited: 2014-01-14 19:54

View 2 revisions

An even better solution would be to have a general path-check, which also checks paths for templates, uploads and the like...

EDIT: the admin-panel, which might display problems on login of Super-Admins.


xhiena (reporter)

a 'chown apache:apache /path/to/limesurvey' make it work to me (the 'chmod -R g+w /path/to/limesurvey' didn't work for me)


jonsen (reporter)

xhiena, your solution does work, as does the chmod variant is most cases.

But the problem is that giving apache all-write access is pretty vulnerable for attacks. Thats why it's a workaround and not a solution.

Of course, if you system is not "very important", the quick-and-dirty solution is okay, but better is to give apache only the rights it needs to run the site.


durangod (reporter)

from the forum

this worked for me as well (this was someones suggestion and it worked)



 i had exactly this same bug and I managed to avoid this by modifying file:

 /var/www/limesurvey/application/libraries/admin/pclzip/pclzip.php file.


 // Samples :
 //define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
 // define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
 if (!defined('PCLZIP_TEMPORARY_DIR')) {
 define( 'PCLZIP_TEMPORARY_DIR', '' );

 I removed // and change tempory dir to /tmp where is 777 rights.

 define( 'PCLZIP_TEMPORARY_DIR', '/tmp/' );

 Reason for this was I wasn't able to find correct place where this zip should have 777 rights by default. No I managed update my limesurvey with comfort update. :woohoo:


c_schmitz (administrator)

Fix committed to master branch:


c_schmitz (administrator)

This will be fixed in the next build by using the LS /temp dir.


c_schmitz (administrator)

Fix committed to master branch:


jonsen (reporter)

Very nice! Is the /temp directory checked for writability though?


c_schmitz (administrator)

During LimeSurvey installation, yes.


c_schmitz (administrator)

2.05+ Build 140216 released

+Related Changesets

-Issue History
Date Modified Username Field Change
2013-10-09 16:01 jonsen New Issue
2013-10-09 16:01 jonsen Status new => assigned
2013-10-09 16:01 jonsen Assigned To => c_schmitz
2013-10-10 12:07 jonsen Note Added: 26691
2014-01-14 19:39 jonsen Note Added: 27866
2014-01-14 19:54 jonsen Note Edited: 27866 View Revisions
2014-01-27 18:13 xhiena Note Added: 28235
2014-01-28 12:55 jonsen Note Added: 28254
2014-02-13 11:53 durangod Note Added: 28711
2014-02-13 12:36 c_schmitz Project Feature requests => Bug reports
2014-02-14 00:52 c_schmitz Changeset attached => LimeSurvey master 39e7fb54
2014-02-14 00:52 c_schmitz Note Added: 28726
2014-02-14 00:52 c_schmitz Resolution open => fixed
2014-02-14 00:53 c_schmitz Note Added: 28727
2014-02-14 00:53 c_schmitz Status assigned => resolved
2014-02-14 00:53 c_schmitz Fixed in Version => 2.05+
2014-02-14 13:16 c_schmitz Changeset attached => LimeSurvey master efa52f53
2014-02-14 13:16 c_schmitz Note Added: 28737
2014-02-14 18:46 jonsen Note Added: 28745
2014-02-14 21:50 c_schmitz Note Added: 28747
2014-02-16 18:32 c_schmitz Note Added: 28777
2014-02-16 18:32 c_schmitz Status resolved => closed
+Issue History