Where to save stuff (in snap-agnostic way)

Luca Dionisi luca.dionisi at gmail.com
Sat Feb 4 11:00:31 UTC 2017


On Sat, Feb 4, 2017 at 11:43 AM, Oliver Grawert <ogra at ubuntu.com> wrote:
> hi,
> Am Freitag, den 03.02.2017, 21:04 +0100 schrieb Luca Dionisi:
>> What is the best place to write (and read) a temporary FIFO file from
>> a confined snap application?
>> This is for simple IPC between 2 processes of the same snap.
>> Before attempting to snap the application I was using a fixed
>> filename
>> in /tmp. Admittedly poor solution.
>> The solution should be usable also with another packaging system.
>>
> well ... in case of snaps /tmp is a private directory that only your
> snap can access so it is actually a good place for such stuff ...

It's worse than that, Jim!

Inside the snap environment I can write files and directories both in
/tmp and in $XDG_RUNTIME_DIR.
What I cannot do anywhere is create a FIFO.

bash-4.3$ mkfifo a
bash: /usr/bin/mkfifo: Permission denied

What's the problem here?

To be honest I should say that my tests have been conducted in LXD
containers. I don't know if the situation holds true also in real
machines.




More information about the Snapcraft mailing list