Skip to content

How to change the gid and uid of user account postgres? #206

Closed
@viciss

Description

@viciss

Hi,
Currently we are using postgres image in our Kubernetes environment, and we use nfs as our data volume solution, that is to say, /var/lib/postgresql/data in postgres image will be mounted to a share folder on nfs server finally, let's say /var/vols/data on nfs server.
The problem is in nfs server configuration, administrator sets the anongid and anonuid to an id that is different with postgres account in docker image, for example, 1999, while the gid and uid of postgres account is 999, and then we got this error:
chown: changing ownership of ‘/var/lib/postgresql/data’: Operation not permitted

Any suggested solutions to solve this problem?
Thanks,
Viciss

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