Skip to content

Volume Permissions #516

Open
Open
@ryanmerolle

Description

@ryanmerolle

Desired Behavior

Given docker volumes are written two by the docker user, volumes hosted to the underlying host for said container are created with the incorrect owner/permissions. If we figured out an elegant process for setting the uid/gid for the docker user in the environment variables, users would be able to setup rw volumes for the container and file permissions/ownership would match the user running the container. The use case would be for directories like media.

Contrast to Current Behavior

Right now the default id is uid=101 gid=0(root)

If you do not have root or sudoers access then you cannot edit or delete the files. If you move files into this volume from outside the container then in the container you would also have the opposite permission issues.

Changes Required

  • Add an environment variable to map uid & gid.
  • Add a process for updating the uid & gid to entrypoint.sh

Examples:

Discussion: Benefits and Drawbacks

Not too many drawbacks if the default uid/gid is set to be the same as it is currently. @tobiasge and I discussed this a few weeks ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue describes an enhancement that we would like to implement in the future.help wantedWe seek out help for implementing this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions