-
-
Notifications
You must be signed in to change notification settings - Fork 115
File permission of lock file #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can't you just change the file permissions after the lock file is created? |
Sure. But this is a potential security problem and should not happen at all. Creating files which are world wide executable is quite the opposite to the principle of least surprise. |
Feel free to open a PR with your proposed solution. |
Ok. I just have a question about the code:
If I understand the documentation of |
Your reading of the documentation is correct. The value of |
The lock file is just an empty file ? Why is it a security problem ? I understand your motivation, this file should not be executable. It would be nice if you have an explication, because you seem to know the potential security problems. |
@gaborbernat - I believe the recent PRs should resolve this one. Please let me know if you disagree or if you believe any additional work is needed here. |
The creation of a lockfile with …
lock = FileLock("/var/lock/foo.lock")
… leads to these file permissions:
-rwxr-xr-x
Is there any way to prevent that the lock file becomes an executable with root ownership?
(Version: 3.0.12-2 in Ubuntu 20.04)
The text was updated successfully, but these errors were encountered: