Can't start runtipi because of postgres volume permission issues
Hi everyone,
I'm trying to install runtipi on my home server, using a fresh install of Fedora 41 but I'm facing a weird permission issue when trying to start the postgres database.
I've seen multiple people having this issue online but none of the solutions I've found in those threads helped.
Here' s the error I'm facing:
Here's an ls of my folder right after the install:
I've tried the following:
- Installing again from scratch
- Changing the ownership of the files to a non root user
- Changing the chmod to 777 on everything
- Creating a named volume for postgres, that one got me past that error but it created new one and the runtipi-cli will override the compose file on start anyways.
Not sure how to reproduce it at this point, it happens all the time, right after a clean install. Happy to provide more details if needed!
26 Replies
Hello
What os are you running?
Hey, I'm running a fresh install of Fedora 41 Workstation!
One additional detail too is that I installed docker and compose using dnf directly:
sudo dnf install docker docker-compose
Yeah that may be an issue. We recommend using the official install script as it uses the docker repositories ensuring you get the latest version. Package manager versions some times are outdated and have a lot of bugs. Can you please go inside the data directory and show me the output of
ls -lah
Sure here you go:
If it's of any help I'm running docker 27.3.1 and compose 2.30.3
Alright assuming this is a fresh install let's try to do
sudo chmod -R 777:777 data
(inside the runtipi folder). Do this while all runtipi containers are stopped and try to start againNo dice, here's a log of what I did
Something is really messed up with your permissions
I suggest deleting the current install
Yeah it's very very strange
Running
sudo usermod -aG docker yourusername
Then logout and log back in
And install runtipi without sudo
curl -L https://setup.runtipi.io | bash
Okay let me give this a shot
This way you add docker permissions to your user without the need to use sudo everytime
Mhhh I don't think it worked, asked me for sudo when running the curl and when I just do a compose it says the engine isn't running
After running this you should log out and log back in
Else it won't work
Yeah that's what I did
What happens if you do docker ps without sudo
I think that's related to the DNS install, let me look it up
Thanks 🙏
Usermod gave you no result right?
Yup
Do you think it would be worth uninstalling all of the docker dnf packages and trying again from scratch with the install script?
Maybe yeah but usermod is supposed to work with usermod anyway
I don't understand why it's failing to give you permissions
Could this be related?
https://stackoverflow.com/questions/56188573/permission-issue-with-postgresql-in-docker-container
Stack Overflow
Permission issue with PostgreSQL in docker container
I'm trying to run a docker image with PostgreSQL that has a volume configured for persisting data.
docker-compose.yml
version: '3.1'
services:
db:
image: postgres
restart: always
v...
Okay so some weird things, if I add a
:z
at the end of the volume name the postgres works but then I have the same problem with the other volumes on the runtipi container...
I'll give uninstalling docker a reinstalling with the script tonight, I think there's definitely something weird the volumes permissions
Example of another permission error I get when getting past the postgres:
Very oddCould be related: https://stackoverflow.com/questions/24288616/permission-denied-on-accessing-host-directory-in-docker
Stack Overflow
Permission denied on accessing host directory in Docker
I am trying to mount a host directory in Docker, but then I cannot access it from within the container, even if the access permissions look good.
I am doing
sudo docker run -i -v /data1/Downloads:/
Okay so running the following command on the runtipi folder seem to have fixed the permission issues with the volumes 🎉
But now I have a new error :despair:
Happy to report that removing docker dnf packages and reinstalling with the official install script fixed all of my issues! Thank you @Stavros for your help 🙂
Cool!