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

os.makedirs(TEMP_DIR, exist_ok=True) causes PermissionError in docker container #6

Closed
crouffer opened this issue Dec 19, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@crouffer
Copy link

Running skift in a docker container results in permission errors when trying to load previously generated models.

File "/usr/local/lib/python3.5/dist-packages/skift/util.py", line 10, in
PermissionError: [Errno 13] Permission denied: '/root/.temp'

The problem is the docker container is running as user 'root', but the /root/ folder is not writable.

I have a fix, and will open a pull request shortly

@shaypal5
Copy link
Owner

Oh, I agree whoeheatedly. I wrote this package before I knew about the XDG Base Directory Specification.

I chose a very bad place for a user-based temp directory. Nevertheless, I think using .config/skift/, even if it is appropriate for the regular user use-case, probably won't solve this problem with root.

I'd love to hear about your fix. How about using /opt? Isn't it basically where packages should put things they need when they are installed? And I do believe all users can read and write to /opt.

@crouffer
Copy link
Author

crouffer commented Jan 2, 2019

This is fixed in #7

@crouffer crouffer closed this as completed Jan 2, 2019
@shaypal5 shaypal5 assigned shaypal5 and unassigned shaypal5 Feb 13, 2020
@shaypal5 shaypal5 added the bug Something isn't working label Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants