From b82425f1a308300c163f921fdd44564b048ccf60 Mon Sep 17 00:00:00 2001 From: Torxgewinde Date: Sat, 19 Sep 2020 19:15:44 +0200 Subject: [PATCH] Fixing regression Existing folders were overwritten and this leads to false permissions --- postinst.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postinst.sh b/postinst.sh index 0bc14f1..a97e7bd 100644 --- a/postinst.sh +++ b/postinst.sh @@ -28,7 +28,8 @@ apt update apt install -y wireguard #extract the tarball to the root directory, all extracted files will be owned by root:root -tar --directory=/ --strip-components=1 --no-same-owner --owner=root --group=root -xzf /tmp/files.tgz +#directories that already exist will not be overwritten +tar --directory=/ --strip-components=1 --no-same-owner --owner=root --group=root --no-overwrite-dir --preserve-permissions --extract --gzip --file /tmp/files.tgz #fix permissions and ownership chown -R bbuser:bbuser /home/bbuser