[snap] Permission denied on Private encrypted folder
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| AppArmor |
Low
|
Jamie Strandboge | ||
| snapd |
Low
|
Jamie Strandboge | ||
| chromium-browser (Ubuntu) |
Low
|
Unassigned | ||
| snapd (Ubuntu) |
Low
|
Unassigned |
Bug Description
When accessing the Private (/home/
Package: chromium-browser
Version: 77.0.3865.
description: | updated |
Olivier Tilloy (osomon) wrote : | #1 |
Changed in chromium-browser (Ubuntu): | |
status: | New → Confirmed |
summary: |
- [snap] Permission denied on Private folder + [snap] Permission denied on Private encrypted folder |
Changed in chromium-browser (Ubuntu): | |
importance: | Undecided → Low |
Jamie Strandboge (jdstrand) wrote : | #2 |
Encrypted home is typically setup as ~/.Private, not ~/Private and the policy already allows:
owner @{HOME}/.Private/** mrixwlk,
owner @{HOMEDIRS}
The home interface should already allow ~/Private. What is the denial you see in the logs?
Olivier Tilloy (osomon) wrote : | #3 |
Indeed I can see the rules you mention in /etc/apparmor.
However I can reliably reproduce the issue, and I'm seeing the following denial:
AVC apparmor="DENIED" operation="open" profile=
Jamie Strandboge (jdstrand) wrote : | #4 |
Ok, that is a read on /home/ubuntu/
Olivier Tilloy (osomon) wrote : | #5 |
Yes, it is mounted:
ubuntu@bionicvm:~$ mount | grep Private
/home/ubuntu/
Jamie Strandboge (jdstrand) wrote : | #6 |
Ok, I'll fix this in the next batch of policy updates for snapd.
Changed in snapd (Ubuntu): | |
assignee: | nobody → Jamie Strandboge (jdstrand) |
importance: | Undecided → Low |
status: | New → Triaged |
Olivier Tilloy (osomon) wrote : | #7 |
Thanks Jamie.
I'll mark the bug invalid for chromium. Even though chromium is visibly affected, the root cause has been identified and is going to be fixed soon.
Changed in chromium-browser (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in snapd (Ubuntu): | |
status: | Triaged → In Progress |
Changed in apparmor: | |
status: | New → Triaged |
importance: | Undecided → Low |
assignee: | nobody → Jamie Strandboge (jdstrand) |
Jamie Strandboge (jdstrand) wrote : | #8 |
Changed in snapd (Ubuntu): | |
assignee: | Jamie Strandboge (jdstrand) → nobody |
Changed in snapd: | |
importance: | Undecided → Low |
assignee: | nobody → Jamie Strandboge (jdstrand) |
milestone: | none → 2.42.3 |
Changed in snapd (Ubuntu): | |
status: | In Progress → Triaged |
Changed in snapd: | |
status: | New → In Progress |
I can reliably reproduce the issue after creating an encrypted Private directory with ecryptfs- setup-private (see https:/ /help.ubuntu. com/community/ EncryptedPrivat eDirectory# Setup_Your_ Encrypted_ Private_ Directory).
The problem stems from the fact that the home interface doesn't allow reading/writing to hidden folders in $HOME, and the ~/Private folder is actually backed by encrypted data in ~/.Private.
This is not specific to chromium, other strictly confined snaps using the home interface would be similarly affected.
Interestingly, saving a file to the folder still works, despite the error and the fact that the file dialog is unable to show the contents of the folder.