-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
Fix #586: Use user name instead of userid #589
Conversation
Nginx unit needs the user and group parameter as names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you put it like this, the solution looks obvious. Thanks.
Hello, Can someone approve this PR? Thanks a lot! |
I feel like this is misleading. The uid of the user unit is 100, not 101.
So you are changing the running user from uid 101 (nonexistent user) to uid 100 (the unit user). According to this comment, using a nonexistent userid was on purpose. I think I get what you are trying to do, but the description does not match the change. Also as a sidenote, if you are running docker rootless or with userns, there is nothing wrong with running the container as root. |
Does it matter? (This is a serious question, I don't mean to sound snarky.)
I disagree. IIRC, it was never our intention to use a userid with no corresponding entry in |
Does it matter in a practical sense, maybe. Files touched by unit in mounted folders (media only?) will now have a new UID. Could cause issues depending on permission setup on the host. Using a low UID is also a little iffy, if the goal is to isolate the container better from the host. UID 100 is _apt and 101 is systemd-timesync on debian for example, most distros start application users from uid 100. Running the container as the root group also doesn't seem like the right choice when trying to isolate the host. My other gripe was with creating changes that are not what the commit message states. The commit should mention that the user was changed from 101 (nonexistent) to 100 (unit) and the PR should at least mention why, reading the PR it doesn't seem that @tobiasge was aware of this, which is why I pointed it out. |
We're now using the account that is created when installing the nginx-unit package for Alpine. As for the root group: Openshift (and Kubernetes) use this group (and a random userid) for pods that are run in those plattforms. So I think this is OK.
I'm aware of the change. Will mention it in the release notes. |
Nginx Unit user UID has changed to 999 which breaks git data source sync in Netbox. Netbox 3.7.x container fixed this and use user name and group `unit:root` instead od user ID. This fix sets the default netbox user in the same way as `unit:root`. Refer to related issue and netbox-docker PR: - netbox-community/netbox-docker#1200 - netbox-community/netbox-docker#589 Signed-off-by: Matej Feder <matej.feder@dnation.cloud>
Nginx Unit user UID has changed to 999 which breaks git data source sync in Netbox. Netbox 3.7.x container fixed this and use user name and group `unit:root` instead od user ID. This fix sets the default netbox user in the same way as `unit:root`. Refer to related issue and netbox-docker PR: - netbox-community/netbox-docker#1200 - netbox-community/netbox-docker#589 Signed-off-by: Matej Feder <matej.feder@dnation.cloud>
Related Issue: #586
New Behavior
Contrast to Current Behavior
[alert] 7#7 getpwnam("101") failed, user "101" not found
Discussion: Benefits and Drawbacks
Changes to the Wiki
Proposed Release Note Entry
Double Check
develop
branch.