From 10b99bb72a83c1509466122011df7947056c9d06 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Sat, 21 Jan 2023 14:26:07 +0530 Subject: [PATCH] make signup script executable (700) --- pages/signup.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pages/signup.go b/pages/signup.go index 71b0eaf..da0431e 100644 --- a/pages/signup.go +++ b/pages/signup.go @@ -46,8 +46,13 @@ func SignupPage(c *fiber.Ctx) error { "sed s/REPLACEME/" + username + "/g /home/" + username + "/{meta-info.env,Caddyfile}\n" + "loginctl enable-linger" + username + "\n" + "setquota -u " + username + " 20G 20G 0 0 /\n" + - "echo \"" + username + "'s account has been created!\"" + "echo \"" + username + "'s account has been created!\"" + + "rm -rf $0" + chmoderr := os.Chmod("/var/publapi/users/"+username+".sh", 0700) + if chmoderr != nil { + log.Error(err) + } // write to file _, err = f.WriteString(bashscript) if err != nil {