How to give write permission in webapplication snap?

return self.callable(*self.args, **self.kwargs)
File “/snap/alphawebserver/14/lib/python3.5/site-packages/cherryserver.py”, line 62, in login
with open(storagedirectory+‘adminlogin.json’, ‘w’) as outfile:
PermissionError: [Errno 13] Permission denied: ‘/home/alphaict/snap/alphawebserver/adminlogin.json’

I am running this snap in ubuntu core 16

Looking at the snap it doesn’t seem production quality yet, and you might want to make it private, or at least remove it from the stable channel until it’s been better tested.

There are some hard wired paths, IP addresses etc inside the snap which will ensure it doesn’t work as expected on systems other than your own.

On your specific question, it depends what the application needs write access to. What’s the ultimate goal here?

you are trying to write one level too high up …
try /home/alphaict/snap/alphawebserver/current/ instead … (though in any case you should rather use the $SNAP_USER_DATA environment variable in your code anyway to not hardcode such a path)

Thanks ,

Now its run with hardcode path. but please let me know how to use the $SNAP_USER_DATA in my code?