Skip to content

fix(docker): set explicit home dir for app user to resolve permission issues#742

Open
CODEAbhinav-art wants to merge 2 commits into
jlab-sensing:mainfrom
CODEAbhinav-art:fix-gunicorn-permissions
Open

fix(docker): set explicit home dir for app user to resolve permission issues#742
CODEAbhinav-art wants to merge 2 commits into
jlab-sensing:mainfrom
CODEAbhinav-art:fix-gunicorn-permissions

Conversation

@CODEAbhinav-art
Copy link
Copy Markdown
Contributor

@CODEAbhinav-art CODEAbhinav-art commented Apr 1, 2026

Name: Abhinav Mishra
Affiliation/Title: GSV, Contributor

Purpose of the PR Resolves an [Errno 13] Permission denied error during local backend and worker startup by correctly configuring the Docker app user's home directory.

Summary When running docker compose up --build locally, the environment was failing to start. Gunicorn was throwing a permission denied error when trying to create its control socket (gunicorn.ctl), which subsequently caused the Celery worker container to fail as well, since they share the same base image.

This PR modifies backend/Dockerfile to explicitly assign a home directory (/home/app) to the app user that sits entirely outside the mounted volume, and sets the HOME environment variable accordingly. This ensures the user has the correct write permissions without interfering with the local volume mount, allowing both the main backend server and the background worker to boot cleanly.

Development Environment * OS: Linux (Ubuntu)

  • Python/Docker version: Python 3.11 / Docker Compose

Task List - [x] All environments can be built

  • All tests pass
  • Linting passes
  • Updated the CHANGELOG.md
  • Static code analysis passes
  • Clear documentation for new code (N/A)

Relevant Issues Closes #670
Replaces #678

@CODEAbhinav-art
Copy link
Copy Markdown
Contributor Author

@jmadden173
Please review whenever you have a moment.
Thanks!

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 this pull request may close these issues.

Errors during backend startup

1 participant