# 由于 postgres 权限错误，从非常旧的容器升级失败

**URL:** https://meta.discourse.org/t/upgrading-from-a-very-old-container-fails-due-to-postgres-permission-errors/368597
**Category:** Bug
**Created:** [2025年六月2日 19:30 UTC](https://meta.discourse.org/t/upgrading-from-a-very-old-container-fails-due-to-postgres-permission-errors/368597 "2025-06-02T19:30:41Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [2025年六月2日 20:08 UTC](https://meta.discourse.org/t/upgrading-from-a-very-old-container-fails-due-to-postgres-permission-errors/368597/2 "2025-06-02T20:08:01Z")

</div>

> [@pfaffman](#):
>
> 找到一个正在运行的服务器并执行 `ls -ld /var/discourse/shared/standalone/postgres_data`

或者，更简单的方法：

```plaintext
○ → docker run --rm discourse/base:2.0.20250226-0128 id postgres
uid=101(postgres) gid=104(postgres) groups=104(postgres),107(ssl-cert)

```

或者甚至更好：

```plaintext
docker run --rm -v /var/discourse/shared/standalone/postgres_data:/data discourse/base:2.0.20250226-0128 chown -R postgres:postgres /data

```

---

_[View the full topic](https://meta.discourse.org/t/upgrading-from-a-very-old-container-fails-due-to-postgres-permission-errors/368597)._
