ConcurrentRotatingFileHandler chmod will fail across many users
blakehilliard opened this issue · comments
Jonathan Blake Hilliard commented
Suppose I have a script which can by run by many users, which uses ConcurrentRotatingFileHandler to the same log file. You've provide "chmod" to allow us to set permissions to ensure it is made writable by both users, but there are 2 problems:
- Even if the file is made writable, "chmod" is not allowed by another process (on linux at least?). So if root creates the file and the script chmods it to open up the permissions, then if some other user runs the script, their "chmod" with throw an exception.
- A small race condition on file creation, where there log is created and then afterward the permissions are changed.