Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud upgrade from 28 to 29 fails because of the Files app #322621

Open
gianmarcogg03 opened this issue Jun 26, 2024 · 5 comments
Open

Nextcloud upgrade from 28 to 29 fails because of the Files app #322621

gianmarcogg03 opened this issue Jun 26, 2024 · 5 comments

Comments

@gianmarcogg03
Copy link
Contributor

Describe the bug

When I try to upgrade from Nextcloud 28 to 29, it fails and the nextcloud-setup service gives this error: UnexpectedValueException: The files of the app "files" were not correctly replaced before running the update.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Set the package version from 28 to 29
  2. Rebuild the system

Expected behavior

Nextcloud should upgrade fine.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Notify maintainers

@schneefux @bachp @globin @Ma27

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.30, NixOS, 24.05 (Uakari), 24.05.675.805a384895c6`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos-24.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@Ma27
Copy link
Member

Ma27 commented Jun 30, 2024

Just a bunch of notes:

So, for now, I'd rule out a weird timing issue (not 100% sure though).

@gianmarcogg03 there are multiple directories with Nextcloud apps installed. You can find those listed in your /var/lib/nextcloud/config/config.php below apps_paths. Can you check please if there are multiple directories containing a directory files? If so, can you check the appinfo/info.xml of each and share the tags inside <dependencies>?

@gianmarcogg03
Copy link
Contributor Author

The app paths are /nix/store/yw3sh97ajpnnw1nxmdc8hzba8xw5afhr-nextcloud-28.0.5-with-apps/apps and /nix/store/yw3sh97ajpnnw1nxmdc8hzba8xw5afhr-nextcloud-28.0.5-with-apps/store-apps. The files app directory is present only in the first app path, although both have other app directories for extensions to the files app (such as files_external, files_fulltextsearch, files_rightclick, etc.) if that has any impact on this problem.

@Ma27
Copy link
Member

Ma27 commented Jun 30, 2024

They still are even though you switched to Nextcloud 29? I think we found the problem then.

Can you please check if systemd-tmpfiles has any mentions of unsafe path transitions?

@gianmarcogg03
Copy link
Contributor Author

There's unsafe path transitions on /srv/nextcloud and /srv/nextcloud/config (I have my state directory in this custom /srv directory instead of the normal /var/lib, is this a problem?).

@Ma27
Copy link
Member

Ma27 commented Jun 30, 2024

@gianmarcogg03 which user owns /srv/nextcloud?

systemd-tmpfiles will refuse to create directories owned by another user unless the parent directories are owned by the same user or root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants