broken ~<user>/snap/<snap>/<version> permissions: owned root:root not <user>:<group>
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
This is an issue I have encountered on two (both 22.04) different systems, one with the 'teams' snap and a second with the 'slack' snap.
$ pwd
/home/user/
$ ls -la
total 27
drwxr-xr-x 5 user @user 6 Oct 9 21:34 .
drwx------ 11 user @user 11 Oct 9 21:32 ..
drwxr-xr-x 4 user @user 6 Sep 23 07:45 65
drwx------ 4 root root 5 Oct 9 20:43 66
drwxr-xr-x 3 user @user 3 Mar 16 2022 common
lrwxrwxrwx 1 user @user 2 Oct 9 21:26 current -> 66
In this case the snap fails to start with permission errors. My guess is that the migration of user data failed part way through presumably in a code path which doesn't handle interruption or is capable of being resumed. There is approximately 1.2T free space (df -h) for /home/user so I don't think this
is a free space problem.
$ sudo du -sm 65 66
1115 65
406 66
My workaround is to point the the 'current' link at the old version and then start the snap:
$ rm -f current; sudo rm -rf 66; ln -s 65 current; snap
Importing existing Slack profile from /home/user/
Import done in 831.232 s
$ apt-cache policy snapd
snapd:
Installed: 2.56.2+22.04ubuntu1
Candidate: 2.56.2+22.04ubuntu1
Version table:
*** 2.56.2+22.04ubuntu1 500
500 http://
100 /var/lib/
2.55.3+22.04 500
500 http://
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
Hi James, do you actually have a /home/user/ .config/ Slack folder in your system?
The workaround you used seems to have copied your old data from there, instead of actually using the data from the 65th revision of slack.
What I would try to do:
cd /home/user/ snap/slack
rm -f current
ls -l 66 # I guess this does not exist
sudo rm -rf 66 # Just in case
sudo snap refresh --revision=65 slack
sudo snap refresh --stable slack
And see if the problem reproduces again. But before doing that, it would be nice if you could attach the output of
sudo journalctl -u snapd
so that we can see if there are still traces of the error that snapd incurred into when upgrading.