It says
Exit code: 1. Reason: => Database and media directory: /label-studio/data
=> Static URL is set to: /static/
Traceback (most recent call last):
File "/label-studio/.venv/bin/label-studio", line 3, in <module>
from label_studio.server import main
File "/label-studio/label_studio/server.py", line 23, in <module>
from label_studio.core.argparser import parse_input_args
File "/label-studio/label_studio/core/argparser.py", line 5, in <module>
from .settings.base import EXPORT_DIR
File "/label-studio/label_studio/core/settings/base.py", line 470, in <module>
os.makedirs(MEDIA_ROOT, exist_ok=True)
File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/label-studio/data/media'
When starting up
That error is pretty straightforward — Label Studio is trying to create its media folder but doesn’t have permission.
Here’s how to fix it:
-
Check who owns the folder
ls -ld /label-studio/data
If it’s owned by root, Label Studio (running as a different user) can’t write there.
-
Give yourself permission
sudo chown -R $USER:$USER /label-studio/data
or if you’re running inside Docker, adjust ownership to the container user (often 1001 or label-studio).
-
Set writable permissions (if quick and dirty):
sudo chmod -R 777 /label-studio/data
This is less safe, but fine for local experiments.
-
If Dockerized:
-
Mount a local volume that’s writable:
docker run -it -p 8080:8080 \
-v $(pwd)/mydata:/label-studio/data \
heartexlabs/label-studio:latest
-
Replace $(pwd)/mydata with a folder on your machine you own.