Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume Permissions #516

Open
ryanmerolle opened this issue May 19, 2021 · 3 comments
Open

Volume Permissions #516

ryanmerolle opened this issue May 19, 2021 · 3 comments
Labels
enhancement The issue describes an enhancement that we would like to implement in the future. help wanted We seek out help for implementing this issue.

Comments

@ryanmerolle
Copy link
Contributor

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.

@ryanmerolle ryanmerolle added the enhancement The issue describes an enhancement that we would like to implement in the future. label May 19, 2021
@ryanmerolle ryanmerolle added the help wanted We seek out help for implementing this issue. label Jan 5, 2022
@aryrz
Copy link

aryrz commented Mar 18, 2022

it's same issue for me. id=101 is default for "unit" user

@ryanmerolle
Copy link
Contributor Author

another example

https://github.com/linuxserver/docker-baseimage-ubuntu/tree/xenial/root/etc/cont-init.d

Let me try to take a stab at this this week.

@mburgholte
Copy link

mburgholte commented Sep 7, 2023

I am not sure if it is the same error. But after updating to the current version, it is no longer possible to upload pictures due to lack of permissions.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue describes an enhancement that we would like to implement in the future. help wanted We seek out help for implementing this issue.
Projects
None yet
Development

No branches or pull requests

3 participants