View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
16352Bug reportsFile managerpublic2020-06-05 14:38
Reportermfrankiewicz Assigned To 
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version4.2.4 
Summary16352: incorrect upload filepath
Description

Uploaded file path is incorrect, directory separator is missing.

Steps To Reproduce
  1. go to filemanager, any survey, e.g. https://lime.example.com/index.php/admin/filemanager?surveyid=123456
  2. try to load file "X.jpg"
  3. file does not appear on list, upload endpoint returns incorrect file path in "debug" key, on server file lands at this path - upload/surveys/123456X.jpg
TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)4.2.4+200520
I will donate to the project if issue is resolvedNo
Browser
Database type & version10.0.38-MariaDB
Server OS (if known)
Webserver software & version (if known)
PHP Version7.1

Users monitoring this issue

There are no users monitoring this issue.

Activities

guest

guest

2020-06-03 17:37

viewer   ~58162

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30001

Jmantysalo

Jmantysalo

2020-06-04 00:32

reporter   ~58163

Thanks, but now on a test machine I get "An error has occured and the file list could not be loaded: Error: You don't have permission to this folder" for every survey when trying to list files. They are there and seen as a logo file at least, but listing fails. Can you check if it is just me?

mfrankiewicz

mfrankiewicz

2020-06-04 11:04

reporter   ~58170

Hi, i'm using 4.2.4+200520 in production, with this fix "inline" (till it got released) and it's working. Please check your directories chmod, i have 775 on upload, upload/survey and upload/survey/123456 (concrete survey upload dir). There are also issues with default .htaccess generated by Lime, it might be not compatible with your http server version, try delete .htaccess files from upload, upload/survey and upload/survey/123456 and retest please.

ollehar

ollehar

2020-06-04 11:11

administrator   ~58171

We'll revert the file manager to LS3 in the next minor release, so we won't fix any further issues in this file manager.

Jmantysalo

Jmantysalo

2020-06-04 11:22

reporter   ~58172

Estimate of date for next minor release? (Is it 4.2.nextnumber or 4.3.0?)

ollehar

ollehar

2020-06-04 11:24

administrator   ~58173

https://manual.limesurvey.org/LimeSurvey_roadmap#Current_release_schedule

ollehar

ollehar

2020-06-04 11:41

administrator   ~58174

4.3 is next minor release; 4.2.x is called "patch release". :) You can read details on semver.org.

lime_release_bot

lime_release_bot

2020-06-04 12:32

administrator   ~58177

Fixed in Release 4.2.7+200604

Jmantysalo

Jmantysalo

2020-06-04 20:58

reporter   ~58185

Hi, i'm using 4.2.4+200520 in production, with this fix "inline" (till it got released) and it's working. Please check your directories chmod, i have 775 on upload, upload/survey and upload/survey/123456 (concrete survey upload dir). There are also issues with default .htaccess generated by Lime, it might be not compatible with your http server version, try delete .htaccess files from upload

No help. There was only one .htaccess, on upload/surveys, and removing it did not help. Apache user has r- and x-permissions.

There are strange errors, "SELinux is preventing /usr/sbin/php-fpm from write access on the directory /var/www/html/limesurvey.#012#012***", but setting SELinux to permissive did not help either.

mfrankiewicz

mfrankiewicz

2020-06-05 09:00

reporter   ~58188

Hmm, do you have an option to test it on other machine with different configuration? It seems like the fpm configuration is problem here, not application.

Or maybe you could write simple upload form for testing purposes e.g. in test.php in document root?

Jmantysalo

Jmantysalo

2020-06-05 11:35

reporter   ~58190

Now I tested on localhost having Ubuntu 20.04. In this I have just a+rwx for permissions and I just downloaded 4.2.7. Does not seem to work. However, I did not made clean install, so maybe there is something strange in DB or something.

Anyways, I think I'll just wait for 4.3.x anyways.

mfrankiewicz

mfrankiewicz

2020-06-05 14:38

reporter   ~58200

Lime stores absoulte file path in database, so if you are testing existent files on new instance with different document root path, then some issues may occur.

When i tested lime on dev instance with db dump from production, i had to change absolute path using sed on dump, eg. if you dump db from prod located in /var/www/prod to dev instance located in /var/www/dev then you should use something like this:
sed -i -e 's/\/var\/www\/prod/\/var\/www\/dev/g' dump_from_prod.sql

Related Changesets

LimeSurvey: master c1ffddca

2020-06-03 17:37:01

Michał Frankiewicz


Committer: GitHub Details Diff
Fixed issue 16352: missing directory separator in uploaded file path #1428 Affected Issues
16352
mod - application/controllers/admin/LimeSurveyFileManager.php Diff File

Issue History

Date Modified Username Field Change
2020-06-01 16:08 mfrankiewicz New Issue
2020-06-03 17:37 Changeset attached => LimeSurvey master c1ffddca
2020-06-03 17:37 guest Note Added: 58162
2020-06-04 00:32 Jmantysalo Note Added: 58163
2020-06-04 11:04 mfrankiewicz Note Added: 58170
2020-06-04 11:11 ollehar Note Added: 58171
2020-06-04 11:22 Jmantysalo Note Added: 58172
2020-06-04 11:24 ollehar Note Added: 58173
2020-06-04 11:41 ollehar Note Added: 58174
2020-06-04 12:32 lime_release_bot Note Added: 58177
2020-06-04 12:32 lime_release_bot Status new => closed
2020-06-04 12:32 lime_release_bot Resolution open => fixed
2020-06-04 20:58 Jmantysalo Note Added: 58185
2020-06-05 09:00 mfrankiewicz Note Added: 58188
2020-06-05 11:35 Jmantysalo Note Added: 58190
2020-06-05 14:38 mfrankiewicz Note Added: 58200