浏览代码

handle 0600 default perms in uploads

George Baugh 5 月之前
父节点
当前提交
ffc0002b40
共有 1 个文件被更改,包括 2 次插入 和 0 次删除
  1. 2 0
      lib/Trog/DataModule.pm

+ 2 - 0
lib/Trog/DataModule.pm

@@ -471,6 +471,8 @@ sub _handle_upload ( $file, $uuid, $private=0 ) {
     my $newname = "$uuid.$file->{filename}";
     $newname = "private/$newname" if $private;
     File::Copy::move( $f, "www/assets/$newname" );
+    # Regrettably, we have no control over the perms of the temp file that starman creates for uploads.
+    chmod(0755, "www/assets/$newname");
     $seen_files{$fname} = "/assets/$newname";
     return $seen_files{$fname};
 }