From 84aef713d85f98c64e23b9a5bdebe4f8eab09354 Mon Sep 17 00:00:00 2001 From: Paula Date: Wed, 25 Sep 2024 16:08:22 -0300 Subject: [PATCH] test --- tljh/user.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tljh/user.py b/tljh/user.py index 8baf7848..9b10dc59 100644 --- a/tljh/user.py +++ b/tljh/user.py @@ -51,7 +51,10 @@ def ensure_user_with_s3(username, s3_bucket_dir, iam_role): subprocess.check_call(["chmod", "o-rwx", expanduser(f"~{username}")]) if s3_bucket_dir and iam_role: - subprocess.call(["s3fs", s3_bucket_dir, expanduser(f"~{username}"), "-o", f"iam_role={iam_role}", "-o", "allow_other", "-o", "dbglevel=debug", "-o", "url=https://s3.amazonaws.com", "-o", "nonempty"]) + # mkdir s3 bucket directory + subprocess.check_call(["mkdir", "-p", expanduser(f"~{username}/s3bucket")]) + subprocess.check_call(["chmod", "o-rwx", expanduser(f"~{username}/s3bucket")]) + subprocess.call(["s3fs", s3_bucket_dir, expanduser(f"~{username}/s3bucket"), "-o", f"iam_role={iam_role}", "-o", "allow_other", "-o", "dbglevel=debug", "-o", "url=https://s3.amazonaws.com", "-o", "nonempty"]) pm = get_plugin_manager() pm.hook.tljh_new_user_create(username=username)