Snap nextCloud desktop client can't write log file due to apparmor (Ubuntu 22.04)

Hello, I just installed the snap NextCloud desktop client on Ubuntu 22.04. It can’t write the log file due to an apparmor Deny. I desperately need help because I can’t synchronize my files.

This is the message in syslog:

May 16 09:54:44 xxx kernel: [ 3075.066216] audit: type=1400 audit(1652687684.005:292): apparmor="DENIED" operation="mknod" profile="snap.nextcloud-desktop-client.nextcloud" name="/home/xxx/snap/nextcloud-desktop-client/54/.config/Nextcloud/logs/20220516_0954_owncloud.log.0" pid=3405 comm="nextcloud" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000

This is the version that was installed with the upgrade from Ubuntu 21.10 to 22.04.

$ LANG=en snap list nextcloud-desktop-client
Name                      Version  Rev  Tracking       Publisher  Notes
nextcloud-desktop-client  3.5.0    55   latest/stable  glasen     -

This is my snap version

$ LANG=en snap version
snap    2.55.3+22.04ubuntu1
snapd   2.55.3+22.04ubuntu1
series  16
ubuntu  22.04
kernel  5.15.0-27-generic

looks like:

you should enable refresh-app-awareness, then you will be asked to stop the client for upgrades:

Thank you for your help.

What exactly would this do and how would it solve my problem ? I don’t want to stop upgrades of the client. This is what I found confusing in you message.

Just to make sure there is no misunderstanding, NextCloud is a service that synchronize files between a client and a server. It is this synchronization that fails with the error. I had to pause it so that I don’t get an error dialog every 40 seconds.

instead of silently upgrading in the background, it will hold the update (for up to 60 days where it will then enforce it) and show you a desktop notification to instead stop the client and manually do a snap refresh, that prevents desktop apps from being upgraded while they are running…

OK, I’ll try that but I’m not fully sure the problem is caused by snap trying to upgrade NextCloud.

it is not by trying but by simply doing it :slight_smile:

during upgrade your writable directories change to the new ones matching the the new version … the old ones become unwritable at this moment which likely causes your error …

I’m sorry. I just understood how to see the initial reference you made by the snap manager. I did what you suggest. Thank you very much.

1 Like