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

PermissionError: [Errno 13] Permission denied: '/public/media' #56

Open
d33tah opened this issue Feb 9, 2024 · 9 comments · May be fixed by #64
Open

PermissionError: [Errno 13] Permission denied: '/public/media' #56

d33tah opened this issue Feb 9, 2024 · 9 comments · May be fixed by #64

Comments

@d33tah
Copy link

d33tah commented Feb 9, 2024

> sudo docker exec -ti pretalx pretalx init
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/pretalx/src/pretalx/__main__.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 382, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 102, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 89, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 217, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/pretalx/src/pretalx/settings.py", line 59, in <module>
    directory.mkdir(parents=True, exist_ok=True)
  File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/public/media'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/pretalx/src/pretalx/__main__.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 382, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 102, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 89, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 217, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/pretalx/src/pretalx/settings.py", line 59, in <module>
    directory.mkdir(parents=True, exist_ok=True)
  File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/public/media'

A workaround I did was sudo docker exec --user 0 -ti pretalx pretalx init, but I hadn't yet verified whether it solves the problem

@rixx
Copy link
Member

rixx commented Feb 9, 2024

Happy to merge PRs fixing this problem! As the pretalx docker image is community maintained, I won't have time to look into this myself.

@Zaczero
Copy link

Zaczero commented Feb 13, 2024

I was not able to reproduce the issue. Could you please share more details about your setup? Are you using docker/docker-compose? Do you use docker volumes? Did you follow the production instructions?

@d33tah
Copy link
Author

d33tah commented Feb 13, 2024

@Zaczero I only cloned it and ran docker-compose up -d.

@rixx
Copy link
Member

rixx commented Feb 13, 2024

I was not able to reproduce the issue.

Weird, because I just set up pretalx-docker for the first time in probably five years, literally only ran docker compose up -d and docker exec -ti pretalx pretalx init as instructed by the README, and could reproduce the issue just fine.

Would be nice if somebody could either provide better setup instructions or add the --user 0 workaround to the README.

@lujoga
Copy link
Contributor

lujoga commented Feb 16, 2024

The problem seems to be that currently there is no pre-built pretalx/standalone image with a /public directory owned by pretalxuser. This should be fixed as soon as an image based on the updated Dockerfile is released.

@rixx
Copy link
Member

rixx commented Feb 17, 2024

There is no new image being released, because the GitHub action for a release ran into a timeout after six hours of … not much happening (cf).

I'll re-run the job, but if that doesn't change anything, somebody will have to fix the build or people will just have to build the image locally.

@uebmaster
Copy link

Same issue for me.

PermissionError: [Errno 13] Permission denied: '/public/media'

Thanks in advance.

@turbotimon
Copy link
Contributor

turbotimon commented Mar 26, 2024

Have faced the same problem (ans still have some open). I made a PR

Happy to merge PRs fixing this problem! As the pretalx docker image is community maintained, I won't have time to look into this myself.

@rixx Happy to make a PR to hopefully imporve UX, as it took me hours to find that out.. Not sure to fix all the problems people facing in this issue but at least it give some hints! #60

(Btw, still facing some issues with pretalx ignoring static path and imho the main docu could also improved, but thats in an other issue in the main repo)

@rixx
Copy link
Member

rixx commented Mar 26, 2024

imho the main docu could also improved

pretalx is open source and happy for contributions. Apart from that, it's mostly developed (and documented, and run, …) by me on my own, and the documentation (as well as every other part of the project) being imperfect just comes with the fact that I have limited time and attention. Apologies that it took you hours to find out how to run pretalx – this is probably where I should remind people that there's also the offer of hosted pretalx and/or a support contract for immediate help with problems like that.

rixx pushed a commit that referenced this issue Mar 26, 2024
@almereyda almereyda linked a pull request May 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants