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!!!