From f57efd30b8400efee5ab59c739b69b010a44bcd1 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Sat, 27 Mar 2021 21:30:16 +0100 Subject: [PATCH] Fixed data dir ownership in case of dpkg-reconfigure --- distribution/debian/postinst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/distribution/debian/postinst b/distribution/debian/postinst index 8875d672e..df3c8fd42 100644 --- a/distribution/debian/postinst +++ b/distribution/debian/postinst @@ -66,9 +66,11 @@ fi # Create data directory if [ ! -d "$CONFDIR" ]; then mkdir -p "$CONFDIR" - chown -R $USER:$GROUP "$CONFDIR" fi +# Set permissions on data directory (always do this instead only on creation in case user was changed via dpkg-reconfigure) +chown -R $USER:$GROUP "$CONFDIR" + #BEGIN BUILTIN UPDATER # Apply patch if present if [ "$UPDATER" = "BuiltIn" ] && [ -f /usr/lib/sonarr/bin_patch/release_info ]; then