Skip to content
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

learner.save creates file with different permissions than open().write #282

Open
basnijholt opened this issue Jun 2, 2020 · 0 comments
Open
Labels

Comments

@basnijholt
Copy link
Member

basnijholt commented Jun 2, 2020

This is annoying when one uses a shared file system, where all other files that are written (with default settings) will be readable by other users but files that are saved with Adaptive are not.

In Adaptive this happens because of atomicwrites, code example:

from atomicwrites import AtomicWriter

with open("test_open", "w") as f:
    f.write("hi")

with AtomicWriter("test_adaptive", "wb", overwrite=True).open() as f:
    f.write(b"blob")

gives

$ ls -lah test*
-rw-------. 1 a-banijh a-banijh 4 Jun  2 08:33 test_adaptive
-rw-rw-r--. 1 a-banijh a-banijh 2 Jun  2 08:33 test_open

Maybe relevant:

Tagging @georgwinkler @jbweston

@basnijholt basnijholt added the bug label Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant