# Quickstart: Compose and Rails - postgres permissions error

**URL:** <https://forums.docker.com/t/quickstart-compose-and-rails-postgres-permissions-error/72448>\
**Category:** Docker Desktop\
**Created:** [April 3, 2019, 1:38pm UTC](https://forums.docker.com/t/quickstart-compose-and-rails-postgres-permissions-error/72448 "2019-04-03T13:38:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smcmullin](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@smcmullin](https://forums.docker.com/u/smcmullin)\
**Post date:** [April 3, 2019, 1:38pm UTC](https://forums.docker.com/t/quickstart-compose-and-rails-postgres-permissions-error/72448/1 "2019-04-03T13:38:34Z")

</div>

I’m following the [https://docs.docker.com/compose/rails/](https://docs.docker.com/compose/rails/) Compose and Rails quickstart document, without modification, using Docker Desktop for Windows.

I am able to get through the `docker-compose build` step successfully, and then modify the app’s `config/database.yml`. However, when I then run `docker-compose up` I get:

```auto
$ docker-compose up
Recreating postgres ... done
Recreating rails5_web_1 ... done
Attaching to postgres, rails5_web_1
postgres | The files belonging to this database system will be owned by user "postgres".
postgres | This user must also own the server process.
postgres |
postgres | The database cluster will be initialized with locale "en_US.utf8".
postgres | The default database encoding has accordingly been set to "UTF8".
postgres | The default text search configuration will be set to "english".
postgres |
postgres | Data page checksums are disabled.
postgres |
postgres | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres | creating subdirectories ... ok
postgres | selecting default max_connections ... 20
postgres | selecting default shared_buffers ... 400kB
postgres | selecting dynamic shared memory implementation ... posix
postgres | creating configuration files ... ok
postgres | running bootstrap script ... 2019-04-03 13:13:27.844 UTC [77] FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
postgres | 2019-04-03 13:13:27.844 UTC [77] HINT: The server must be started by the user that owns the data directory.
postgres | child process exited with exit code 1
postgres | initdb: removing contents of data directory "/var/lib/postgresql/data"
postgres exited with code 1

```

I’ve confirmed that the postgres user owns the erroring `/data` directory. I’m baffled as I assume many people have run through that Quickstart with no issues. I’m not doing anything unique as far as I can tell.

Help & suggestions very welcome!
