cmd_run.go:179: WARNING: cannot create user data directory: cannot create "/home/$USER/snap/$SNAP/$VERSION": mkdir /home/$USER/snap/$SNAP: permission-denied
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Expired
|
Undecided
|
Unassigned |
Bug Description
[ Test Case ]
1) Setup clean Xenial VM without logging into the snap store
2) Update snapd to 2.15.2
3) $ git clone https:/
4) $ snapcraft
5) $ sudo snap install --force-dangerous client-
6) $ client-
2016/09/19 17:04:24.925319 cmd_run.go:179: WARNING: cannot create user data directory: cannot create "/home/
failed to create user data directory. errmsg: Permission denied
Additional info:
ls -l ~/snap shows it is root:root
ls -l /root/snap shows it is also created and root:root
The test program snaps both a client and daemon, the daemon runs as a systemd service, and the client can connect to the service via a socket that resides in the SNAP_DATA directory. The application makes no use of the SNAP_USER_DATA directory. The problem only occurs when the userspace/client program is invoked.
I get the following when trying to launch the latest Libre Office snap on Ubuntu 16.04.3:
$ snap run libreoffice snap/libreoffic e/21: Permission denied
cannot create user data directory: /home/danilocm/
$ sudo snap run libreoffice
[sudo] password for danilocm:
mkdir: cannot create directory '/run/user/0': Permission denied
No protocol specified
No protocol specified
mkdir: cannot create directory '/run/user/0': Permission denied
No protocol specified
No protocol specified