snap fails to refresh a snap when a home directory is encrypted with fscrypt

Bug #1877764 reported by Laurent Bonnaud
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi,

on my system snap sometimes fails to refresh a snap with the following error messages:

# snap refresh
error: cannot perform the following tasks:
- Copy snap "chromium" data (cannot copy "/home/bonnaudl/snap/chromium/1117" to "/home/bonnaudl/snap/chromium/1149": failed to copy all: "'/home/bonnaudl/snap/chromium/1117' -> '/home/bonnaudl/snap/chromium/1149'\ncp: cannot create directory '/home/bonnaudl/snap/chromium/1149/.config': Required key not available\ncp: cannot create directory '/home/bonnaudl/snap/chromium/1149/.local': Required key not available\n'/home/bonnaudl/snap/chromium/1117/.themes' -> '/home/bonnaudl/snap/chromium/1149/.themes'\ncp: cannot create symbolic link '/home/bonnaudl/snap/chromium/1149/.themes': Required key not available\n'/home/bonnaudl/snap/chromium/1117/.last_revision' -> '/home/bonnaudl/snap/chromium/1149/.last_revision'\ncp: cannot open '/home/bonnaudl/snap/chromium/1117/.last_revision' for reading: Required key not available\ncp: cannot create directory '/home/bonnaudl/snap/chromium/1149/Downloads': Required key not available\ncp: cannot create directory '/home/bonnaudl/snap/chromium/1149/.pki': Required key not available" (1))

According to those error messages, snap is not able to handle my home directory that is encrypted with fscrypt.

$ fscrypt status .
"." is encrypted with fscrypt.

Policy: c036e60805532bcc
Options: padding:32 contents:AES_256_XTS filenames:AES_256_CTS
Unlocked: Yes

Protected with 1 protector:
PROTECTOR LINKED DESCRIPTION
6b76ac84fec508fe No login protector for bonnaudl

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: snapd 2.44.3+20.04
Uname: Linux 5.6.11-050611-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Sat May 9 18:51:12 2020
SourcePackage: snapd
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.sudoers.d.99-snapd.conf: [inaccessible: [Errno 13] Permission denied: '/etc/sudoers.d/99-snapd.conf']

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Yu Lou (louyu1999) wrote :

Similar error (Required key not available) while trying to refresh gnome-system-monitor. I also encrypt my home directory with fscrypt using login protector.

tags: added: groovy hirsute
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.