#623·linkding

Keep data directory ownership based on PGID and PUID

Author: AkashRajpurohitCreated Feb 1, 2024Updated Aug 20, 2026
Labelsenhancement

Is there any way to maintain the same ownership of the data directory as supplied via the PGID and PUID environment variables?

Currently, it changes ownership to www-data user, I would like it to retain the current user's ownership.

I am trying to automate the setup via ansible and since when the container runs it modifies the ownership, the playbook does not stay idempotent and fails since the ownership is different now.

Docker compose file is the similar as suggested in the setup guide.