if ($this->rotate == 0) {
// No rotational difference, just copy it as-is
@copy($this->filepath, $outpath);
+
+ // And set chmod
+ @chmod($outpath, common_config('attachments', 'chmod'));
return $outpath;
} elseif (abs($this->rotate) == 90) {
// Box is rotated 90 degrees in either direction,
throw new Exception(_('Unknown file type'));
}
- // Always chmod 0644 to have other processes (e.g. queue daemon read it)
- @chmod($outpath, 0644);
+ // Always chmod 0644 (default) to have other processes (e.g. queue daemon read it)
+ @chmod($outpath, common_config('attachments', 'chmod'));
imagedestroy($image_src);
imagedestroy($image_dest);