From ed881ea57dcd5fa0f743a2eca743ceada39c436e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Tue, 27 Aug 2024 13:12:32 +0200 Subject: [PATCH] feat(paperless): fix permissions of ftp uploaded files --- configuration.nix | 2 +- ftp.nix | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index fe68343..6a8fac7 100644 --- a/configuration.nix +++ b/configuration.nix @@ -48,7 +48,7 @@ in users.users.paperless-upload = { isNormalUser = true; homeMode = "770"; - group = "paperless-upload"; + group = "paperless"; }; system.stateVersion = "23.11"; } diff --git a/ftp.nix b/ftp.nix index 7d66a3d..38419dd 100644 --- a/ftp.nix +++ b/ftp.nix @@ -3,11 +3,15 @@ enable = true; localUsers = true; writeEnable = true; + chrootlocalUser = true; extraConfig = '' log_ftp_protocol=YES pasv_enable=YES pasv_min_port=51000 pasv_max_port=51999 + local_umask=022 + file_open_mode=0777 + allow_writeable_chroot=YES ''; }; }