cannot create user data directory: /home/mg/snap/ripgrep/8: Not a directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
A while ago I installed ripgrep on a server with
sudo apt install snapd
sudo snap install ripgrep --classic
sudo snap alias ripgrep.rg rg
and it didn't work for me:
$ rg --help
cannot create user data directory: /home/mg/
but I was busy and didn't file a bug. Today it still doesn't work, but the error message is different:
$ rg --help
cannot create user data directory: /home/mg/
Possibly relevant information (especially given the symlink reference in the original error message): my home directory according to /etc/passwd is /home/mg, which is actually a symlink to ../home-ssd/mg. /home is an ext4 partition on a MD RAID-1 device on spinning rust, /home-ssd is an ext4 partition on an LVM volume (mirrored as raid-1) on a pair of SSDs. /home-ssd is too small to contain all the home directories, hence the selective symlinking.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: snap (not installed)
ProcVersionSign
Uname: Linux 4.15.0-91-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.11
Architecture: amd64
Date: Wed Mar 18 14:42:48 2020
SourcePackage: snap
UpgradeStatus: Upgraded to bionic on 2019-09-11 (188 days ago)
affects: | snap (Ubuntu) → snapd (Ubuntu) |
This kind of home setup is not supported by snapd.
You can work around it by actually _mounting_ your home, form whichever filesystem or raid configuration at /home/$LOGNAME. You can also use a bind mount for the same effect.