Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Allow non-unique GIDs #599

Merged
merged 1 commit into from Mar 15, 2020
Merged

Allow non-unique GIDs #599

merged 1 commit into from Mar 15, 2020

Conversation

ljm42
Copy link
Contributor

@ljm42 ljm42 commented Jan 6, 2020

Need to allow non-unique group ids, so paperless can map to an existing GID.

The comment says the map_uidgid() function came from docker-gitlab, the same fix was applied there too:
sameersbn/docker-gitlab@c80bd87

Need to allow non-unique group ids, so paperless can map to an existing GID.

The comment says the map_uidgid() function came from docker-gitlab, the same fix was applied there too:
  sameersbn/docker-gitlab@c80bd87
@ljm42
Copy link
Contributor Author

ljm42 commented Jan 6, 2020

More info:

Inside the paperless docker, files created by paperless in the media folder are owned by paperless:paperless, that is fine.

Outside the docker, I want them to be owned by nobody:users

To do this, I need to pass these variables to the docker:

  -e 'USERMAP_UID'='99'
  -e 'USERMAP_GID'='100'

If I just send the USERMAP_UID variable it changes the UID without a problem, but files are owned by nobody:1000

When I send the USERMAP_GID variable, the docker fails with this message:

Mapping UID and GID for paperless:paperless to 99:100
groupmod: GID '100' already exists

This PR will allow the groupmod command to succeed

As mentioned above, this same fix was made in the original repo that the map_uidgid() function came from:
sameersbn/docker-gitlab@c80bd87

Copy link
Member

@pitkley pitkley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great change! 👍

@pitkley pitkley requested a review from a team February 23, 2020 11:15
@jholton
Copy link

jholton commented Mar 14, 2020

Running into this problem right now. Hopefully gets merged soon!

@ahyear ahyear merged commit b741f1e into the-paperless-project:master Mar 15, 2020
@ljm42 ljm42 deleted the patch-1 branch April 5, 2020 17:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants