View Issue Details

IDProjectCategoryView StatusLast Update
08252Bug reports[All Projects] ComfortUpdatepublic2014-02-16 18:32
ReporterjonsenAssigned Toc_schmitz 
Status closedResolutionfixed 
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




2013-10-10 12:07

reporter   ~26691

A workaround by "dirtyhawk" from the linked thread:

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


2014-01-14 19:39

reporter   ~27866

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.



2014-01-27 18:13

reporter   ~28235

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)


2014-01-28 12:55

reporter   ~28254

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.


2014-02-13 11:53

reporter   ~28711

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:


2014-02-14 00:52

administrator   ~28726

Fix committed to master branch:


2014-02-14 00:53

administrator   ~28727

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


2014-02-14 13:16

administrator   ~28737

Fix committed to master branch:


2014-02-14 18:46

reporter   ~28745

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


2014-02-14 21:50

administrator   ~28747

During LimeSurvey installation, yes.


2014-02-16 18:32

administrator   ~28777

2.05+ Build 140216 released

Related Changesets

LimeSurvey: master 39e7fb54

2014-02-13 23:49:44


Details Diff
Fixed issue 08252: The temporary path for PCLZIP is not properly set
mod - application/controllers/admin/export.php Diff File
mod - application/controllers/admin/labels.php Diff File
mod - application/controllers/admin/responses.php Diff File
mod - application/controllers/admin/surveyadmin.php Diff File
mod - application/controllers/admin/templates.php Diff File
mod - application/controllers/admin/update.php Diff File
add - application/libraries/admin/pclzip.php Diff File
rm - application/libraries/admin/pclzip/pclerror.lib.php Diff File
rm - application/libraries/admin/pclzip/pcltrace.lib.php Diff File
rm - application/libraries/admin/pclzip/pclzip-trace.lib.php Diff File
rm - application/libraries/admin/pclzip/pclzip.php Diff File
add - application/third_party/pclzip/pclzip.lib.php Diff File

LimeSurvey: master efa52f53

2014-02-14 12:16:19


Details Diff
Fixed issue 08252: The temporary path for PCLZIP is not properly set
mod - application/libraries/admin/pclzip.php Diff File

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