workspace-images icon indicating copy to clipboard operation
workspace-images copied to clipboard

Project folder permissions won't let docker postgres work

Open alanwilter opened this issue 4 years ago • 4 comments

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.

alanwilter avatar Nov 10 '21 18:11 alanwilter

/team workspace

princerachit avatar Jan 20 '22 05:01 princerachit

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.

princerachit avatar Jan 20 '22 05:01 princerachit

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"?

atduarte avatar Mar 30 '22 13:03 atduarte

This issue be addressed in #10229, let's wait it deployed to production.

jenting avatar Jun 01 '22 03:06 jenting