From 8c271382404ab357b9f95501b7d4e93df9d46e9d Mon Sep 17 00:00:00 2001 From: Harshad Sharma Date: Thu, 23 May 2024 13:48:11 +0530 Subject: [PATCH] Fix permissions on data dir after running service commands as root --- priv/freebsd/service_account_register.sh.eex | 2 ++ priv/freebsd/service_password_reset.sh.eex | 2 ++ 2 files changed, 4 insertions(+) diff --git a/priv/freebsd/service_account_register.sh.eex b/priv/freebsd/service_account_register.sh.eex index 4515f74..43363e5 100644 --- a/priv/freebsd/service_account_register.sh.eex +++ b/priv/freebsd/service_account_register.sh.eex @@ -2,3 +2,5 @@ # account_register <%= @app_dir %>/bin/<%= @name %> eval "Freedive.Release.account_create" + +chown -R <%= @user %>:<%= @group %> <%= @data_dir %> diff --git a/priv/freebsd/service_password_reset.sh.eex b/priv/freebsd/service_password_reset.sh.eex index cae193d..6021b19 100644 --- a/priv/freebsd/service_password_reset.sh.eex +++ b/priv/freebsd/service_password_reset.sh.eex @@ -2,3 +2,5 @@ # password_reset <%= @app_dir %>/bin/<%= @name %> eval "Freedive.Release.password_reset" + +chown -R <%= @user %>:<%= @group %> <%= @data_dir %>