Conversation
Fix owner/permissions problem
|
@mihaon is attempting to deploy a commit to the Directus Team on Vercel. A member of the Team first needs to authorize it. |
|
Is this a specific problem when running the compose file on linux cause on Windows I'm not running into such problems? |
|
I don't know about Windows. Did you try to In Linux I get: So, the |
|
Postgres docker image contains another workaround to prevent same issue: Workaround in the Dockerfile (like in the Postgres) is better then |
The https://directus.io/docs/getting-started/create-a-project contains a
docker-compose.ymlwhich will cause a permissions error when trying to upload files via the admin panel just after first start. It happens because docker "bind mount" host directory (in contrast to named volumes) is not initialized with owner/permissions taken from inside the container directory.But since from Docker Compose 2.30 it became possible to use a post-start hook to fix this problem - https://docs.docker.com/compose/how-tos/lifecycle/#post-start-hooks.
So quick fix for
.ymlmight be:P.S.: this can also be fixed by adding
chownto theCMDin theDockerfile(likepostgresdocker image does)