Snap confinement is an Ubuntu security feature. This is the reason Nextcloud-snap is not supported on non-Ubuntu distributions. So unless you allow the Nextcloud snap to access removable media in /mnt
or /media
you will not be able to access any other directory outside of the confinement on Ubuntu.
@kyrofa INFO:
This has nothing to do with permissions. It's not a permissions issue, it's a confinement issue. The Linux kernel won't allow the snap to touch your home directory or any other directory outside of the confinement
Snap confinement is a great security feature on Ubuntu, but what can you do to access your home directory from within your self-hosted Nextcloud-snap instance?
In a self-hosted environment on Ubuntu where SSH is available on the local network, yet blocked externally (firewall/router), you can bypass Snap confinement in Nextcloud-snap by connecting to local servers via SFTP using external storage app to access any local non-root directory, such as your home directory.