kazeburo / Plack-Middleware-ServerStatus-Lite

Plack-Middleware-ServerStatus-Lite
Other
26 stars 11 forks source link

This middleware assumes that files created at process startup can be accessed by child processes #15

Open autarch opened 10 years ago

autarch commented 10 years ago

This middleware appears to create the counter file and scoreboard directory at process startup.

However, under something like Starman, we can start the process as root and then chuid/chgrp to a user like www-data in the child processes. This means that the children can't actually write to the files/dirs created by the parent.

I'm not sure how best to fix this, but at the very least it'd be worth noting this issue in the docs.

billmoseley commented 8 years ago

I ran up against the same issue and I pre-create the files. I'm on a VM (not shared) so I just chmod to be world writable.

Is there any reason the child process couldn't creates these on the first update? Would require some locking, but that's already being used, IIRC.