Limesurvey 1.92 set chmod 644 for directories

More
3 years 6 months ago #103936 by marius2
marius2 created the topic: Limesurvey 1.92 set chmod 644 for directories
Hello,

I have problem with Limesurvey Version 1.92+ Build 120919
I want to use "File upload" as a question type, I can upload a file, I can see it but if I click submit, I'm getting error message.

I checked on server, /upload/ and /upload/surveys/ is set to 755. But when I upload a file as an answer /upload/surveys/survey_id directory is created with 644 permissions and it cannot put uploaded file there, so that's the problem.

How can I force limesurvey to set 755 on directories?
Server is running suPHP, so administrator said that I should write umask(0022) somehere, but I don't know where...

My /public_html/admin/scripts/kcfinder/config.php looks like this:
$_CONFIG = array(

'disabled' => true,
'readonly' => false,
'denyZipDownload' => true,

'theme' => "oxygen",

'uploadURL' => "upload",
'uploadDir' => "",

'dirPerms' => 0755,
'filePerms' => 0644,

'deniedExts' => "exe com msi bat php cgi pl php4 php5 sh",
....

ERROR CODE:
Warning: mkdir(): Permission denied in /home/xxxxx/public_html/classes/expressions/LimeExpressionManager.php on line 7560 Call Stack: 0.0102 2055224 1. {main}() /home/xxxxx/public_html/index.php:0 0.1923 16567576 2. require_once('/home/xxxxx/public_html/group.php') /home/xxxxx/public_html/index.php:890 0.3267 19526952 3. LimeExpressionManager::JumpTo() /home/xxxxx/public_html/group.php:170 0.3279 19969216 4. LimeExpressionManager::ProcessCurrentResponses() /home/xxxxx/public_html/classes/expressions/LimeExpressionManager.php:4741 0.3281 19974280 5. mkdir() /home/xxxxx/public_html/classes/expressions/LimeExpressionManager.php:7560 Warning: rename(/home/xxxxx/public_html/tmp/upload/futmp_sngtz9rurxqpera,/home/xxxxx/public_html/upload/surveys/73946/files/fu_hdu5a2kxeea8fa2): Permission denied in /home/xxxxx/public_html/classes/expressions/LimeExpressionManager.php on line 7562 Call Stack: 0.0102 2055224 1. {main}() /home/xxxxx/public_html/index.php:0 0.1923 16567576 2. require_once('/home/xxxxx/public_html/group.php') /home/xxxxx/public_html/index.php:890 0.3267 19526952 3. LimeExpressionManager::JumpTo() /home/xxxxx/public_html/group.php:170 0.3279 19969216 4. LimeExpressionManager::ProcessCurrentResponses() /home/xxxxx/public_html/classes/expressions/LimeExpressionManager.php:4741 0.3284 19974520 5. rename() /home/xxxxx/public_html/classes/expressions/LimeExpressionManager.php:7562 Error moving file to target destination

Thanks.

Please Log in to join the conversation.

More
3 years 6 months ago - 3 years 6 months ago #104054 by DenisChenu
DenisChenu replied the topic: Limesurvey 1.92 set chmod 644 for directories
Really not sure, but maybe you can try
umask(0022);
In your condif.php file.

But really not tested ... suphp allways make problem...

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 3 years 6 months ago by DenisChenu.

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now