Skip to content

error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted #2030

Closed
@143heyan

Description

What happens?

When I start Docker with the command:

docker run -tid \
 --name paradedb  \
 -e POSTGRES_USER=postgres \
 -e POSTGRES_PASSWORD=xxx \
 -e POSTGRES_DB=mydb \
 -v /data/paradedb_data:/var/lib/postgresql/data/ \
 -p 5432:5432 \
 --restart=always \
 --privileged=true \
paradedb/paradedb:latest

found that when I added

-v paradedb_data:/var/lib/postgresql/data/

the Docker status is always Restarting (1) 1 second ago, with the following error:

docker logs ccd
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

To Reproduce

None

OS:

linux

ParadeDB Version:

latest

Are you using ParadeDB Docker, Helm, or the extension(s) standalone?

ParadeDB Docker Image

Full Name:

longlong

Affiliation:

none

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include the code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configurations (e.g., CPU architecture, PostgreSQL version, Linux distribution) to reproduce the issue?

  • Yes, I have

Metadata

Assignees

Labels

bugSomething isn't workingdockerPull requests that update Docker codepriority-highHigh priority issuequestionFurther information is requesteduser-requestThis issue was directly requested by a user

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions