Test: Upload file permissions rwx--r--r

This commit is contained in:
Rick Falkvinge
2017-10-20 17:25:35 +02:00
parent b73143ddfc
commit 08cf7b8b0c
2 changed files with 141 additions and 107 deletions
+7
View File
@@ -6,6 +6,7 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mono.Unix.Native;
using Newtonsoft.Json.Linq;
using Swarmops.Frontend.Socket;
using Swarmops.Logic;
@@ -279,6 +280,9 @@ namespace Swarmops.Frontend.Socket
"(BackendConvertedFile) " + pageCounter.ToString(CultureInfo.InvariantCulture),
fileLength, guid, null, person);
Syscall.chmod(Document.StorageRoot + lastPageFileName,
FilePermissions.S_IRWXU | FilePermissions.S_IRGRP | FilePermissions.S_IROTH);
// Prepare to save the next file
lastPageFileName = testPageFileName;
}
@@ -307,6 +311,9 @@ namespace Swarmops.Frontend.Socket
"(BackendConvertedFile) " + pageCounter.ToString(CultureInfo.InvariantCulture),
fileLengthLastPage, guid, null, person);
Syscall.chmod(Document.StorageRoot + lastPageFileName,
FilePermissions.S_IRWXU | FilePermissions.S_IRGRP | FilePermissions.S_IROTH);
// Finally, ask the backend to do the high-res conversions, but now we have the basic, fast ones
JObject backendRequest = new JObject();