From b4eb20904aa8f4ea7ec0ef58eac7889b4b864277 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 15 Sep 2021 16:49:57 -0700 Subject: :SETUID: ensure that the data directory actually exists Signed-off-by: Sean Whitton --- src/connection/setuid.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/connection') diff --git a/src/connection/setuid.lisp b/src/connection/setuid.lisp index 2bc3baa..ef00967 100644 --- a/src/connection/setuid.lisp +++ b/src/connection/setuid.lisp @@ -52,7 +52,8 @@ (user (connection-connattr connection :remote-user))) (run-program (list "chown" "-R" (format nil "~A:~A" uid gid) - (unix-namestring (slot-value connection 'datadir)))) + (unix-namestring (ensure-directories-exist + (slot-value connection 'datadir))))) (posix-login-environment user (connection-connattr connection :remote-home)) ;; We are privileged, so this sets the real, effective and saved IDs. -- cgit v1.2.3