From 02cf8578c99c781720d15b4836afa289cfc5a393 Mon Sep 17 00:00:00 2001 From: Glax Date: Wed, 30 Oct 2024 22:27:50 +0100 Subject: [PATCH] Explicitly set File/Directory permissions for jobs --- Tranga/Jobs/JobBoss.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tranga/Jobs/JobBoss.cs b/Tranga/Jobs/JobBoss.cs index bbdf95d..95456dc 100644 --- a/Tranga/Jobs/JobBoss.cs +++ b/Tranga/Jobs/JobBoss.cs @@ -1,6 +1,8 @@ -using System.Text.RegularExpressions; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; using Newtonsoft.Json; using Tranga.MangaConnectors; +using static System.IO.UnixFileMode; namespace Tranga.Jobs; @@ -146,6 +148,8 @@ public class JobBoss : GlobalBase if (!Directory.Exists(TrangaSettings.jobsFolderPath)) //No jobs to load { Directory.CreateDirectory(TrangaSettings.jobsFolderPath); + if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + File.SetUnixFileMode(TrangaSettings.jobsFolderPath, UserRead | UserWrite | UserExecute | GroupRead | OtherRead); return; } Regex idRex = new (@"(.*)\.json");