Nextcloud on Deepin broken

I have a machine which is running deepin15. I installed snapd from their archive which gives me snapd 2.30-5+b1. I’ve installed some snaps which work fine elsewhere and come across a snag.

I can’t install the NextCloud snap because there are errors in the configure hook (permission denied). Is this a problem with NextCloud (ping @kyrofa) (which is odd given it works elsewhere), or snapd (ping @zyga-snapd) :).

snapcraft@deepin15-snapcraft:~$ snap changes
ID   Status  Spawn                 Ready                 Summary
1    Done    2018-10-03T16:07:56Z  2018-10-03T16:07:56Z  Initialize system state
2    Done    2018-10-03T16:07:59Z  2018-10-03T16:08:25Z  Install "core" snap from "beta" channel
3    Done    2018-10-03T16:07:59Z  2018-10-03T16:08:00Z  Initialize device
4    Done    2018-10-03T16:08:25Z  2018-10-03T16:09:08Z  Install "brave" snap
5    Error   2018-10-03T16:09:08Z  2018-10-03T16:09:59Z  Install "nextcloud" snap
6    Done    2018-10-03T16:09:59Z  2018-10-03T16:10:19Z  Install "node-red" snap
7    Done    2018-10-03T16:10:19Z  2018-10-03T16:10:50Z  Install "spotify" snap
8    Done    2018-10-03T16:10:50Z  2018-10-03T16:11:27Z  Install "firefox" snap
9    Done    2018-10-03T16:11:27Z  2018-10-03T16:11:55Z  Install "chromium" snap
10   Done    2018-10-03T16:11:55Z  2018-10-03T16:11:58Z  Install "hello-world" snap
11   Done    2018-10-03T16:11:58Z  2018-10-03T16:12:24Z  Install "skype" snap
12   Done    2018-10-03T16:12:24Z  2018-10-03T16:13:01Z  Install "pycharm-community" snap
13   Done    2018-10-03T16:13:02Z  2018-10-03T16:13:08Z  Install "snapcraft" snap
14   Done    2018-10-03T16:13:08Z  2018-10-03T16:13:34Z  Install "slack" snap

I installed a bunch of other snaps okay, but I don’t believe any there have configure hooks.

snapcraft@deepin15-snapcraft:~$ snap change 5
Status  Spawn                 Ready                 Summary
Done    2018-10-03T16:09:08Z  2018-10-03T16:09:59Z  Ensure prerequisites for "nextcloud" are available
Undone  2018-10-03T16:09:08Z  2018-10-03T16:09:59Z  Download snap "nextcloud" (8971) from channel "stable"
Done    2018-10-03T16:09:08Z  2018-10-03T16:09:58Z  Fetch and check assertions for snap "nextcloud" (8971)
Undone  2018-10-03T16:09:08Z  2018-10-03T16:09:58Z  Mount snap "nextcloud" (8971)
Undone  2018-10-03T16:09:08Z  2018-10-03T16:09:58Z  Copy snap "nextcloud" data
Undone  2018-10-03T16:09:08Z  2018-10-03T16:09:58Z  Setup snap "nextcloud" (8971) security profiles
Undone  2018-10-03T16:09:08Z  2018-10-03T16:09:57Z  Make snap "nextcloud" (8971) available to the system
Undone  2018-10-03T16:09:08Z  2018-10-03T16:09:57Z  Set automatic aliases for snap "nextcloud"
Undone  2018-10-03T16:09:08Z  2018-10-03T16:09:57Z  Setup snap "nextcloud" aliases
Done    2018-10-03T16:09:08Z  2018-10-03T16:09:57Z  Run install hook of "nextcloud" snap if present
Undone  2018-10-03T16:09:08Z  2018-10-03T16:09:57Z  Start snap "nextcloud" (8971) services
Error   2018-10-03T16:09:08Z  2018-10-03T16:09:54Z  Run configure hook of "nextcloud" snap if present

Run configure hook of "nextcloud" snap if present

2018-10-03T17:09:54+01:00 ERROR run hook "configure": 
/snap/nextcloud/8971/snap/hooks/configure: 57: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 69: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 96: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 74: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 86: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 106: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 91: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 101: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 69: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 86: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 96: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied
/snap/nextcloud/8971/snap/hooks/configure: 106: /snap/nextcloud/8971/snap/hooks/configure: snapctl: Permission denied

Here’s the system details.

snapcraft@deepin15-snapcraft:~$ snap version
snap    2.30-5+b1
snapd   2.30-5+b1
series  16
deepin  15.7
kernel  4.15.0-29deepin-generic

Looks like it doesn’t support re-exec, as I’m on a much newer core, but we’re still on old snapd.

snapcraft@deepin15-snapcraft:~$ snap info core
name:      core
summary:   snapd runtime environment
publisher: canonical
description: |
  The core runtime environment for snapd
type:        core
snap-id:     99T7MUlRhtI3U0QFgl5mXXESAiSwt776
tracking:    beta
installed:   16-2.36~pre1 (5624) 92MB core
refreshed:   2018-10-02 12:46:59 +0100 BST
  stable:    16-2.35.2    (5548) 92MB -
  candidate: 16-2.35.2    (5548) 92MB -
  beta:      16-2.36~pre1 (5624) 92MB -
  edge:      16-2.36~pre1 (5633) 92MB -
snapcraft@deepin15-snapcraft:~$ apt-cache policy snapd
  Installed: 2.30-5+b1
  Candidate: 2.30-5+b1
  Version table:
 *** 2.30-5+b1 1001
       1001 panda/main amd64 Packages
        100 /var/lib/dpkg/status

Can we get snapd updated in Deepin?

How many other snaps are affected in this way? How do we know which snaps will fail and not indicate to the user that it’s actually an old version of snapd at fault, not the snap they’re installing? (assuming that’s the issue).

Deepin is based on Debian, with their own archive.

We must update snapd in Debian. This is an action item, follow up, from the sprint but I have not yet managed to devote any time to it.

Thanks for the heads up @popey. Given that Nextcloud works essentially everywhere else I doubt it’s an issue with the snap. I’ve been careful to limit the features used to that from snapd 2.29, and indeed it doesn’t look like it’s using features that are unsupported in 2.30: I can’t really explain the permission denied issue. @zyga-snapd are you sure this relates to it simply being out of date, or are there larger problems?