Postgresql14 appdata directory keeps changing ownership and permissions


Recommended Posts

I am struggling. I have a container setup for authentik that relies on a postgresql14 container. It was working flawlessly until recently. Over the last couple weeks, I get notified that authentik cannot reach the database, so I go looking, and the appdata share looks good, but the postgresql14 appdata directory is now owned by UNKNOWN with only owner rwe privs. The postgresql instance will not start because it is unable to read the files. So, I have been having to go and manually alter the ownership, and privs and it runs fine for a day or two then bam, it died again. I thought it could have something to do with my backup (using CA backup for docker container). So, I exempted the postgres container from this process and it is still happening. I just uninstalled it as I have switched to BTRFS snapshots for backup, I am hoping that fixes the issue. I just restarted the entire system, so I am not sure what the logs will have. If it does it again, I will try to pull the system logs shortly after getting the notice. 

 

Has anyone else had this happened, and if so how did you fix it even if it was something else.

Link to comment

Okay, I did some more digging. It looks like the file permissions change when I start the Postgresql container. I am not sure why this is happening. It is setup to not update and sit at version 14. All of a sudden it just started doing it. Running it as root doesn't help adding the PUID and PGID of 99 and 100 doesn't fix it either. There doesn't seem to be any logs I can find that show it changing in docker logs.

Link to comment
  • 9 months later...
On 6/13/2023 at 11:09 AM, ZerkerEOD said:

Okay, I did some more digging. It looks like the file permissions change when I start the Postgresql container. I am not sure why this is happening. It is setup to not update and sit at version 14. All of a sudden it just started doing it. Running it as root doesn't help adding the PUID and PGID of 99 and 100 doesn't fix it either. There doesn't seem to be any logs I can find that show it changing in docker logs.

I have the same problem, could you fix it?

Edited by Jattzzz
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.