Hello, I would like to request that the bb-go-master snap gets access to the file system through the home interface. This snap is a server that lives inside of the Bumblebee Spaces robotic furniture system (check that out here: bumblebeespaces.com). The server is listening for requests from an app that controls the system, and it maintains a simple db that tracks the systems status in time. So if the bed robot is lowered, the db is updated to say “lowering”, then when it is lowered it says “lowered” and so on. This snap is being run on Ubuntu Core. Thanks, look forward to hearing back!
What file system locations does your server need access to? I ask, since for a system daemon the
home interface is effectively going to be giving access to more locations in
/root, which doesn’t seem that useful on an Ubuntu Core system.
So the goal is for the application to run a boltdb key-value database. All of the library code for bolt is built into the application binary, but it needs to write to a .db file. Is it possible to allow access to a specific file for the database? Or would a better way to go about this be to make a snap of the boltdb project and somehow use that?
It looks like the system-files interface could be a way to achieve what I am looking for. I could use something like
in the config. Does that sound reasonable?
Every snap is given access to its own private storage without any special interface. For a system level daemon, you’d probably want to store it in a location under
$SNAP_COMMON (which expand to
Sounds good, thank you for the info. I will try that out.
I tried to place the db file at the suggested location, but my snap is still unable to access those files:
I tried with the “current” dir also and got the same result. I ran the snap on Ubuntu 16.04 LTS and got the same result and I tried opening the db connection with 777 permissions and no luck. Does it seem feasible to proceed by using the system-files interface to access “/etc/my.db”? If so I would need that interface to be activated for this snap. Let me know your thoughts.
did you run your app as a server (with the
daemon: stanza in snapcraft.yaml) ?
those dirs are only accessible by root, if you run your app as normal user and not as a daemon the user has no permission to access this dir … when running a server for testing purpose as normal app, you should call it with sudo …
Thanks that worked!