mkalam-alami / ludumdare-feedback-friends

A (defunct) incentive to comment on games, initially made for LD36
http://feedback.ld.intricati.com
MIT License
12 stars 5 forks source link

Improve filesystem permissions #33

Open ttencate opened 8 years ago

ttencate commented 8 years ago

With the Force Refresh option, two different Unix users are trying to write to the data/ directory. This gives problems when they try to overwrite each other's files. Copying from https://github.com/mkalam-alami/ludumdare-feedback-friends/commit/f674521d3ebaf514ea2803e9e99db8d8de769e34:

A better fix would be to change the group ownership of the directory to be www-data but keep the owner as ludumdare. Then, we first write the file to a temporary name in the same directory, then atomically move it into the place of the old one.