I am developing a snap package which is trying to write to $SNAP_DATA or $SNAP_COMMON, however these locations don't appear to be writable for my snap. These directories have owner and group as root and are only writable by owner. When I run my snap using "snap run my-snap" my program is simply getting "Permission denied" when trying to write to either of these locations.
I am testing on a Ubuntu 16.04.1 virtual machine.
Assuming these are supposed to be writable, are there any suggestions that may resolve this issue?