From a122a6d8749993d63e33e329b1bd010a1da3636d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roni=20V=C3=A4yrynen?= Date: Wed, 7 Aug 2024 15:48:42 +0300 Subject: [PATCH] fix: non-root user .config directory permissions --- xo-install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xo-install.sh b/xo-install.sh index 7090ae1..8c457b8 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -823,6 +823,11 @@ function InstallXO { fi printinfo "Activating modified configuration file" + if ! [[ -d $CONFIGPATH/.config ]]; then + # create generic .config directory only if it doesn't exist as we set permissions to it + # this directory could potentially exist already and we don't want to override anything + runcmd "install -o $XOUSER -g $XOUSER -m 770 -d $CONFIGPATH/.config" + fi runcmd "mkdir -p $CONFIGPATH/.config/xo-server" runcmd "mv -f $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/sample.config.toml $CONFIGPATH/.config/xo-server/config.toml"