odoo / odoo/docker

UID mismatch and permission problems

Open
#463 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
1.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

The odoo user UID inside container is not the same as host user odoo UID.

how to reproduce the issue:
-adduser odoo (generated UID=1001)
-install docker
-write basic docker compose file to run odoo based on this repo (v15), bind mount filestore directory so you can backup/restore odoo in future
-run odoo and postgres containers and face the filestore permission errors
-docker exec into odoo container
-inside the container the user is odoo with UID 101 and has no permissions to write to filestore. The filestore owner is 1001
-exit from container. User with uid 101 in host is systemd-resolve
-if I do chown 101 to filestore in host, the owner inside the container is odoo now. But this is not ok to have a unrelated system user as owner of odoo filestore directory. Also not good the container user can potentially access system files.

Maybe I am doing something wrong?
What is the right way to run containers and bind mounts with write access?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the basic Docker Compose setup described in the report, including the bind-mounted filestore and the differing host and container UIDs. Review how the Odoo container user and filestore ownership are configured; done means a supported setup provides write access without requiring an unrelated host system user to own the directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.