cannot create user data directory: /home/mg/snap/ripgrep/8: Not a directory

Bug #1867921 reported by Marius Gedminas
6
This bug affects 1 person
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/snap/ripgrep/4: Too many levels of symbolic links

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/snap/ripgrep/8: Not a directory

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)
ProcVersionSignature: Ubuntu 4.15.0-91.92-generic 4.15.18
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)

Revision history for this message
Marius Gedminas (mgedmin) wrote :
Dylan Aïssi (daissi)
affects: snap (Ubuntu) → snapd (Ubuntu)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

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.

Changed in snapd (Ubuntu):
status: New → Invalid
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I'm marking this as invalid. Eventually we would like to support magically transitioning whichever home directory the user has on the system to appear as /home/$LOGNAME for snaps but this is hard for many reasons.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Just to clarify, does this mean root can't use snaps too, or is /root handled specially?

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I'm sorry for being unclear, /root and /home/* are both okay though neither item can be a symbolic link.

As I said eventually we will be able to map /whatever to /var/home/$LOGNAME, most likely, but it requires some PAM integration to get right.

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.