Skip to content

Commit

Permalink
Change permissions for files created through ppt2lp in remote mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ywarnier committed Nov 17, 2016
1 parent ad0219a commit d7c8140
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main/webservices/additional_webservices.php
Expand Up @@ -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);
Expand All @@ -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();
Expand Down

0 comments on commit d7c8140

Please sign in to comment.