Rights problem when running the docker install

Hey there, thanks a lot for pyfedi it's a really nice addition to the network !

I tried to run the docker install and hit some issues with the database:

db-1            | initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted  
db-1            | fixing permissions on existing directory /var/lib/postgresql/data ... 

The problem is that for some reason after cloning the pg folder is owned by root, so it can't change permissions. I had to change owner to 1000 and then the rest of the install procedure went flawlessly !

4 points · 3 comments · view on lemmy.world

3 Comments

rimu@piefed.social · 3 pts · 1y

Thanks for reporting your fix, I had the same issue!

I suspect that adding

      PUID: 1000  
      PGID: 1000  

to the environment section of compose.yaml would stop this from occurring but I haven't tried it.

mesamunefire@piefed.social · 1 pts · 1y (1 reply)

What exactly did you do to solve this? I am seeing something similar.

rako@piefed.social · 2 pts · 1y

In the host I had to change the owner to 1000. It was set to root somehow.