I've used the snap package manager to install packages and I'm always getting the same error, even with the simple hello world example:
$ sudo snap install hello
$ hello
cannot create user data directory: /home/aaa/snap/hello/20: Bad file descriptor
Running with sudo solves the problem for the hello program, but why do I even need to do sudo?
BTW, for the other packages (Meshlab, CloudCompare) it doesn't work also with sudo and gives different errors. For example:
~$ sudo cloudcompare.ccViewer
mkdir: cannot create directory '/run/user/0': Permission denied
No protocol specified
QXcbConnection: Could not connect to display :0
The snap version and Ubuntu distro are:
$ snap version
snap 2.22.7
snapd 2.22.7
series 16
ubuntu 14.04
kernel 4.4.0-64-generic
/home/aaa/snap/or rest of them... if you run it firstly with root, then root created those files... and normal user cant write there. – Flash Thunder Mar 5 '17 at 11:43sudo, similar tosudo apt-get .... I also checked and I have full premissions for/home/aaa/snap/. – Elad Joseph Mar 5 '17 at 11:48