authentik_traefik icon indicating copy to clipboard operation
authentik_traefik copied to clipboard

Permission denied: /media/public

Open dgarner-cg opened this issue 7 months ago • 5 comments

I am having a major difficulty running this stack, surrounding the following error output:

2024-07-21 02:08:39 [info ] Migration needs to be applied migration=tenant_files.py 2024-07-21 02:08:39 [info ] releasing database lock Failed to read config file: ./lifecycle/gunicorn.conf.py Traceback (most recent call last): File "/ak-root/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 111, in get_config_from_filename spec.loader.exec_module(mod) File "<frozen importlib._bootstrap_external>", line 995, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/lifecycle/gunicorn.conf.py", line 154, in <module> run_migrations() File "/lifecycle/migrate.py", line 100, in run_migrations migration.run() File "/lifecycle/system_migrations/tenant_files.py", line 15, in run TENANT_MEDIA_ROOT.mkdir(parents=True) File "/usr/local/lib/python3.12/pathlib.py", line 1311, in mkdir os.mkdir(self, mode) PermissionError: [Errno 13] Permission denied: '/media/public' warning error=exit status 1 event=gunicorn process died, restarting logger=authentik.router timestamp=2024-07-21T02:08:39Z ERR error=exit status 1 event=gunicorn failed to start, restarting logger=authentik.router timestamp=2024-07-21T02:08:39Z DBG event=Loaded config logger=authentik.lib.config timestamp=1721527719.4670758 file=/authentik/lib/default.yml DBG event=Loaded environment variables logger=authentik.lib.config timestamp=1721527719.4674754 count=11 INF event=Starting authentik bootstrap logger=authentik.lib.config timestamp=1721527720.5025237 INF event=PostgreSQL connection successful logger=authentik.lib.config timestamp=1721527720.519482 INF event=Redis Connection successful logger=authentik.lib.config timestamp=1721527720.5209928 INF event=Finished authentik bootstrap logger=authentik.lib.config timestamp=1721527720.521113 2024-07-21 02:08:40 [info ] waiting to acquire database lock 2024-07-21 02:08:40 [info ] Migration needs to be applied migration=tenant_files.py 2024-07-21 02:08:40 [info ] releasing database lock Failed to read config file: ./lifecycle/gunicorn.conf.py Traceback (most recent call last): File "/ak-root/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 111, in get_config_from_filename spec.loader.exec_module(mod) File "<frozen importlib._bootstrap_external>", line 995, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/lifecycle/gunicorn.conf.py", line 154, in <module> run_migrations() File "/lifecycle/migrate.py", line 100, in run_migrations migration.run() File "/lifecycle/system_migrations/tenant_files.py", line 15, in run TENANT_MEDIA_ROOT.mkdir(parents=True) File "/usr/local/lib/python3.12/pathlib.py", line 1311, in mkdir os.mkdir(self, mode) PermissionError: [Errno 13] Permission denied: '/media/public' warning error=exit status 1 event=gunicorn process died, restarting logger=authentik.router timestamp=2024-07-21T02:08:40Z ERR error=exit status 1 event=gunicorn failed to start, restarting logger=authentik.router timestamp=2024-07-21T02:08:40Z DBG event=Loaded config logger=authentik.lib.config timestamp=1721527721.0249119 file=/authentik/lib/default.yml DBG event=Loaded environment variables logger=authentik.lib.config timestamp=1721527721.0253375 count=11 warning error=authentik starting event=failed to proxy to backend logger=authentik.router timestamp=2024-07-21T02:08:41Z INF event=Starting authentik bootstrap logger=authentik.lib.config timestamp=1721527722.1081977 INF event=PostgreSQL connection successful logger=authentik.lib.config timestamp=1721527722.1249876 INF event=Redis Connection successful logger=authentik.lib.config timestamp=1721527722.1268034 INF event=Finished authentik bootstrap logger=authentik.lib.config timestamp=1721527722.126975 2024-07-21 02:08:42 [info ] waiting to acquire database lock 2024-07-21 02:08:42 [info ] Migration needs to be applied migration=tenant_files.py 2024-07-21 02:08:42 [info ] releasing database lock Failed to read config file: ./lifecycle/gunicorn.conf.py Traceback (most recent call last): File "/ak-root/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 111, in get_config_from_filename spec.loader.exec_module(mod) File "<frozen importlib._bootstrap_external>", line 995, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/lifecycle/gunicorn.conf.py", line 154, in <module> run_migrations() File "/lifecycle/migrate.py", line 100, in run_migrations migration.run() File "/lifecycle/system_migrations/tenant_files.py", line 15, in run TENANT_MEDIA_ROOT.mkdir(parents=True) File "/usr/local/lib/python3.12/pathlib.py", line 1311, in mkdir os.mkdir(self, mode) PermissionError: [Errno 13] Permission denied: '/media/public' warning error=exit status 1 event=gunicorn process died, restarting logger=authentik.router timestamp=2024-07-21T02:08:42Z ERR error=exit status 1 event=gunicorn failed to start, restarting logger=authentik.router timestamp=2024-07-21T02:08:42Z DBG event=Loaded config logger=authentik.lib.config timestamp=1721527722.6360176 file=/authentik/lib/default.yml DBG event=Loaded environment variables logger=authentik.lib.config timestamp=1721527722.6364012 count=11 INF event=Starting authentik bootstrap logger=authentik.lib.config timestamp=1721527723.666236 INF event=PostgreSQL connection successful logger=authentik.lib.config timestamp=1721527723.6829164 INF event=Redis Connection successful logger=authentik.lib.config timestamp=1721527723.6844249 INF event=Finished authentik bootstrap logger=authentik.lib.config timestamp=1721527723.6845357 2024-07-21 02:08:43 [info ] waiting to acquire database lock 2024-07-21 02:08:43 [info ] Migration needs to be applied migration=tenant_files.py 2024-07-21 02:08:43 [info ] releasing database lock Failed to read config file: ./lifecycle/gunicorn.conf.py Traceback (most recent call last): File "/ak-root/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 111, in get_config_from_filename spec.loader.exec_module(mod) File "<frozen importlib._bootstrap_external>", line 995, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/lifecycle/gunicorn.conf.py", line 154, in <module> run_migrations() File "/lifecycle/migrate.py", line 100, in run_migrations migration.run() File "/lifecycle/system_migrations/tenant_files.py", line 15, in run TENANT_MEDIA_ROOT.mkdir(parents=True) File "/usr/local/lib/python3.12/pathlib.py", line 1311, in mkdir os.mkdir(self, mode) PermissionError: [Errno 13] Permission denied: '/media/public' warning error=exit status 1 event=gunicorn process died, restarting logger=authentik.router timestamp=2024-07-21T02:08:43Z ERR error=exit status 1 event=gunicorn failed to start, restarting logger=authentik.router timestamp=2024-07-21T02:08:43Z DBG event=Loaded config logger=authentik.lib.config timestamp=1721527724.1895435 file=/authentik/lib/default.yml DBG event=Loaded environment variables logger=authentik.lib.config timestamp=

Why is /media/public being refused mkdir and chown here?

This is happening when being executed through an automation script I created and also when following instructions line by line.

Thank you,

dgarner-cg avatar Jul 21 '24 02:07 dgarner-cg