From 4aa04da9236ed17558236c698b472658b58e5cc6 Mon Sep 17 00:00:00 2001 From: Braxen Date: Sat, 27 Apr 2024 16:36:26 +0200 Subject: [PATCH] use octal conversion for chmod permissions fixes #507 --- server/src/Core/Providers/Base/BaseVOD.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/Core/Providers/Base/BaseVOD.ts b/server/src/Core/Providers/Base/BaseVOD.ts index 490a4bc0..e84b7997 100644 --- a/server/src/Core/Providers/Base/BaseVOD.ts +++ b/server/src/Core/Providers/Base/BaseVOD.ts @@ -2574,7 +2574,10 @@ export class BaseVOD { Config.getInstance().cfg("file_chown_uid"), Config.getInstance().cfg("file_chown_gid") ); - fs.chmodSync(fullpath, Config.getInstance().cfg("file_chmod")); + fs.chmodSync( + fullpath, + parseInt(Config.getInstance().cfg("file_chmod"), 8) + ); } } }