Arch linux - kernel 3.12.36
I'm using mod_wsgi and flask to host a server. I am able to reproduce this issue with the following simplified code and generic .wsgi script:
app = flask.Flask(__name__)
test_file = '/tmp/test'
with open(test_file, 'w') as f:
return 'Hello world'
from MainServer import app as application
I ended up simply moving the file I was attempting to create out of /tmp. The original issues appears to be related to Systemd and special permissions for /tmp (although it persists when changing permissions from 1777 to just 777), but I was not able to figure it out the cause or a solution for it.