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

Read the ENV for tmp or cache dir => need to use this in docker #274

Open
lordspace opened this issue Jun 19, 2023 · 0 comments
Open

Read the ENV for tmp or cache dir => need to use this in docker #274

lordspace opened this issue Jun 19, 2023 · 0 comments
Labels
bug for issue

Comments

@lordspace
Copy link

Provide environment information

Thanks for creating this tool. It seems the tool tries to create files/dirs somewhere in the user's home.
Is it possible to make it so it checks the ENV variables such as GDOWN_CACHE_DIR or GDOWN_TMP_DIR so I can pass that to my docker container?
I had to pass multiple folders to the docker run command in order to keep gdown happy.

--tmpfs /var/www/.cache/ \ --tmpfs /tmp \ --tmpfs /var/www/vhosts \ --tmpfs /home \

/usr/bin/python
Python 3.11.4
gdown  4.7.1

Traceback (most recent call last): File "/usr/bin/gdown", line 8, in <module> sys.exit(main()) ^^^^^^ File "/usr/lib/python3.11/site-packages/gdown/cli.py", line 156, in main filename = download( ^^^^^^^^^ File "/usr/lib/python3.11/site-packages/gdown/download.py", line 223, in download os.makedirs(osp.dirname(cookies_file)) File "<frozen os>", line 215, in makedirs File "<frozen os>", line 215, in makedirs File "<frozen os>", line 215, in makedirs File "<frozen os>", line 225, in makedirs PermissionError: [Errno 13] Permission denied: '/var/www/vhosts'

What OS are you using?

Ubuntu 22.04.4

Describe the Bug

PermissionError: [Errno 13] Permission denied

Expected Behavior

maybe try to save the lock or cookie files in the current dir or /tmp but ideally to read the ENV vars. See the ticket description

To Reproduce

see ticket description.

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

No branches or pull requests

1 participant