Snap applications - cannot create user data directory (home bind mounted)

I have my home folder on another drive, which is mounted via fstab to /mnt/HDD

UUID=123 /mnt/HDD exfat rw,defaults,umask=002,uid=1000,gid=1000,auto,users,exec 0 0

The home folder is then bind mounted to /home

/mnt/HDD/Ubuntu/home /home none defaults,bind 0 0

I don't know if this is the problem, but when I launch some snap applications (e.g. Discord) it says

WARNING: cannot create user data directory: cannot update the 'current' symlink of "/home/user_name/snap/app_name/current": symlink 128 /home/user_name/snap/app_name/current: operation not permitted

along with other failed to create symbolic link ...: Operation not permitted.

Any ideas why this may happen?


Solution 1:

You should not be using a file system that does not support linux symbolic links as your home directory.

Your mounted drive where your home directory is, is formatted in the extfat file system. This is a rather simple file system mainly designed to be used on removable media. It does not support Linux links, nor Linux file permissions. Snap relies on symlinks and therefore cannot work on such a file system.

Make sure your home folder is on a file system that supports symlinks and file system permissions. You still can keep the user files (document files, images, ...) on other media, and symlink - or mount bind - these to folders under your home directory.