workspace-images
workspace-images copied to clipboard
Project folder permissions won't let docker postgres work
Bug description
When starting a gitpod workspace, the project is checked out and the folder permissions are:
drwxr-x---
However, when starting a docker postgres container for the DB whose volume maps to the project folder to run some sql scripts to initialise the DB, this won't work unless folder permission is changed to drwxr-xr-x.
One may say that perhaps the way I'm doing these things is not the correct and gitpod has its own reasons to set the project folder permissions as it is, however, I noticed that umask in a gitpod session is set to 0022, which basically means any new folder would have permission drwxr-xr-x and I wouldn't have run into troubles like I had.
Steps to reproduce
One can try with our project https://github.com/phenopolis/phenopolis_genomics_browser
Start gitpod and run:
touch private.env
docker-compose up db
it will fail with
...
db_1 | psql: error: /app/db/import_schema.sql: Permission denied
now do:
chmod a+rx .
docker-compose down
docker volume rm phenopolis_genomics_browser_db
docker-compose up db
and it will work.
/team workspace
Hi, thanks you for sharing the detailed description. Due to ongoing work with dazzle v2 rewrite of workspace-images repo we will not pick this up and would schedule it once the said work is completed.
Confirmed the problem still exists. Though I'm unsure whether there's any reason for the permissions to be set as drwxr-x---. @princerachit do you? Should this be classified as a "bug"?
This issue be addressed in #10229, let's wait it deployed to production.