Skip to content

No permissions to delete /var/lib/postgresql/data #32

Closed
@daGrevis

Description

@daGrevis

This is how I run Postgres container:

docker run -d \
           -v /etc/fxz/postgres:/var/lib/postgresql/data \
           -e LC_ALL=C.UTF-8 \
           -p 5432:5432 \
           --name=postgres \
           postgres

I can see created directory:

$ ls -l /etc/fxz/
drwx------ 15  999 root 4096 Nov 12 10:59 postgres

But the problem is that I have no permissions to delete it:

$ rm -rf /etc/fxz/postgres/
rm: cannot remove '/etc/fxz/postgres/': Permission denied

If I do it as root, it works.

Are there any way to delete it as non-root user? I am in docker group already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions