# PostgreSQL 13 update from PostgreSQL 10 fails

**URL:** https://meta.discourse.org/t/postgresql-13-update-from-postgresql-10-fails/192865
**Category:** Self-hosting
**Created:** [June 6, 2021, 5:03pm UTC](https://meta.discourse.org/t/postgresql-13-update-from-postgresql-10-fails/192865 "2021-06-06T17:03:45Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)
#### Post date: [October 13, 2021, 7:01pm UTC](https://meta.discourse.org/t/postgresql-13-update-from-postgresql-10-fails/192865/10 "2021-10-13T19:01:55Z")

</div>

Hi again,

> [@amotl](#):
>
> `FATAL: data directory "/shared/postgres_data" has wrong ownership`

following the advice [Update failed (postgresql) - #8 by noezDE](https://meta.discourse.org/t/update-failed-postgresql/153713/8) by @noezDE (thanks a stack!), we have been able to recover from this situation.

Now, the site is running again and we will look into upgrading once again.

With kind regards,  
Andreas.

* * *

### Recovery procedure

At first, progress was made by invoking

```plaintext
chown -R postgres /shared/postgres_data
sv restart postgres

```

After that, the logs said

```plaintext
2021-10-13 18:52:12.437 UTC [3357] FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": Permission denied

```

So, we went full-on and invoked

```plaintext
chown -R postgres:postgres /shared/postgres_*
sv restart postgres

```

Voilà.

---

_[View the full topic](https://meta.discourse.org/t/postgresql-13-update-from-postgresql-10-fails/192865)._
