Unverified Commit c8274e56 authored by Maximilian Bosch's avatar Maximilian Bosch Committed by GitHub
Browse files

Merge: nixos/nextcloud: check if ownership of datadir and config is correct (#379581)

parents 3dde49b2 39dcdc5c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1173,6 +1173,15 @@ in
                exit 1
              fi

              # Check if systemd-tmpfiles setup worked correctly
              if [[ ! -O "${datadir}/config" ]]; then
                echo "${datadir}/config is not owned by user 'nextcloud'!"
                echo "Please check the logs via 'journalctl -u systemd-tmpfiles-setup'"
                echo "and make sure there are no unsafe path transitions."
                echo "(https://nixos.org/manual/nixos/stable/#module-services-nextcloud-pitfalls-during-upgrade)"
                exit 1
              fi

              ${concatMapStrings
                (name: ''
                  if [ -d "${cfg.home}"/${name} ]; then