Skip to content

chown: changing ownership of '/var/...': Operation not permitted #796

Closed
@sfl0r3nz05

Description

@sfl0r3nz05

Hi,

I am deploying the docker postgres as part of a docker-compose, using a volume (data-volume) to export a .csv file, which is sent to elasticsearch via logstash. When I try to copy a query row to this file via:

const rows = await db.query(COPY (SELECT * FROM tokenoffchain WHERE id = (SELECT MAX(id) FROM tokenoffchain)) TO '${process.env.PATH_ELK_CSV}' WITH CSV DELIMITER ',' HEADER ESCAPE '\n' );

, I get a write permission error. So I create the "docker-entrypoint.sh" and pass it through volume as the figure shown.

image

Considering that I have set both POSTGRES_USER and POSTGRES_PASSWORD as environment variables, I am not clear why I cannot change the property or enable the permissions on the .csv file if the docker-entrypoint.sh is:

image

At this moment, I'm setting the permission manually.

Thanks in advance,

Santiago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions