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

Make large uid users run successfully on macOS, fixes #1281 #1285

Merged
merged 1 commit into from Nov 20, 2018

Conversation

rfay
Copy link
Member

@rfay rfay commented Nov 19, 2018

The Problem/Issue/Bug:

A regression in v1.4.0 meant that macOS users (and Linux users, though less likely) with UIDs above 60000 couldn't run ddev successfully (sudo failed, see OP #1281 )

How this PR Solves The Problem:

The basically reverts back to the original behavior, automatically using a uid of 1000 if the UID is above 60000. Otherwise it just tries to use the normal user uid. This is fairly safe on macOS and Windows. It's highly questionable on Linux, where an inappropriate uid can create privileged files.

Manual Testing Instructions:

  • Verify correct behavior with a normal lower-numbered uid (ddev ssh and id). The uid and gid should be the same as your macOS uid/gid.
  • Create a macOS user with a high UID, say 1553427339. You can do this in system prefs, users and groups. You have to right-click the user for advanced options. I called my user "largeuid"
  • Copy the necessary ddev copy to /Users/Shared (or you can download from circleci artifacts)
  • Log in with the user
  • Start docker
  • Make a dummy project and ddev ssh. and id. You should see uid_1000

Automated Testing Overview:

Related Issue Link(s):

Release/Deployment notes:

Copy link
Contributor

@andrewfrench andrewfrench left a comment

Choose a reason for hiding this comment

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

I was able to ddev start and ddev ssh with a new user, highuid with a user ID of 1553427339. Once in the container, id returned a user id of 1000.

@rfay rfay merged commit bf998ec into ddev:master Nov 20, 2018
@rfay rfay deleted the 20181119_handle_large_uid branch November 20, 2018 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants