Change permissions for files created through ppt2lp in remote mode

pull/2487/head
Yannick Warnier 8 years ago
parent ad0219a156
commit d7c8140cdf
  1. 7
      main/webservices/additional_webservices.php

@ -33,7 +33,10 @@ function wsConvertPpt($pptData)
$tempPathNewFiles = $tempArchivePath . 'wsConvert/' . $fileName . '-n/';
$oldumask = umask(0);
$perms = api_get_permissions_for_new_directories();
//$perms = api_get_permissions_for_new_directories();
// Set permissions the most permissively possible: these files will
// be deleted below and we need a parallel process to be able to write them
$perms = 0777;
pptConverterDirectoriesCreate($tempPath, $tempPathNewFiles, $fileName, $perms);
$file = base64_decode($fileData);
@ -42,7 +45,7 @@ function wsConvertPpt($pptData)
$cmd = pptConverterGetCommandBaseParams();
$cmd .= ' -w ' . $w . ' -h ' . $h . ' -d oogie "' . $tempPath . $fullFileName.'" "' . $tempPathNewFiles . $fileName . '.html"';
$perms = api_get_permissions_for_new_files();
//$perms = api_get_permissions_for_new_files();
chmod($tempPathNewFiles . $fileName, $perms);
$files = array();

Loading…
Cancel
Save