This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

⚠️ We've moved!

Hi there!

To reduce project dependency on 3rd party paid services the StackStorm TSC has decided to move the Q/A from this forum to Github Discussions. This will make user experience better integrated with the native Github flow, as well as the questions closer to the community where they can provide answers.

Use 🔗 Github Discussions to ask your questions.

Why can't I write to a file in /tmp?

In my run method I have:
filename = ‘/root/st2-%s.out’ % timestamp
with open(filename , ‘w’) as file:
file.write(json.dumps(payload))

This works, however if I try to put the file in /tmp I get no output file. Anyone know why I can’t write to /tmp? Are there other rules around security, etc. that I should be aware of?

Thanks!!

It could be related to sticky bit (if one is set) on the /tmp folder. You can refer to https://www.thegeekstuff.com/2013/02/sticky-bit/?utm_source=feedburner or https://www.linuxnix.com/sticky-bit-set-linux/

What’s causing it is systemd + privateTmp=true.
See answer in different thread Create file in action not happening with webhook

Ahhh!!! So it’s a systemd thing, not a stackstorm thing!!! Thanks!!!