Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Node container GID and UID not matching local user's on Ubuntu #1240
Tell us about your setup
What is your lando version and operating system?
Tell us about your
name: myproject # Insert the project name here in the format [client][project], i.e. oxfammain. recipe: drupal8 config: xdebug: true webroot: web php: '7.0' conf: php: .vscode/php.ini proxy: mailhog: - mail.myproject.lndo.site services: database: creds: user: database password: database database: database mailhog: type: mailhog hogfrom: - appserver portforward: true node: type: node:carbon build: - "if [ -d $LANDO_MOUNT/web/themes/custom/site_theme ]; then cd $LANDO_MOUNT/web/themes/custom/site_theme && yarn install --production; fi" overrides: services: image: agilecollective/lando-node:latest ports: [3070:3070] # You should change this port to something random and then update gulpconfig.js in the theme to match tooling: npm: service: node yarn: service: node node: service: node gulp: service: node backstop: service: node
My php.ini is set only for xdebug:
[PHP] ;;;;;;;;;;;;;;; ;IMPORTANT; ;PLACE THIS FILE UNDER .vscode folder; ;SO IT DOESNT GET COMMITTED; ;;;;;;;;;;;;;;; ; Xdebug xdebug.max_nesting_level = 256 xdebug.show_exception_trace = 0 xdebug.collect_params = 0 # Extra custom Xdebug setting for debug to work in VSCode. xdebug.remote_enable = 1 xdebug.remote_autostart = 1
Tell us about the command you were running
Tell us about the error you got
The ownership permissions of my
-rw-r--r-- 1 paul www-data 397 Jan 5 2018 id_rsa.pub
Tell us generally about your bug
Locally my UID/GID is 1000, that is expected. The appserver container returns
uid=1000(www-data) gid=1000(www-data) groups=1000(www-data)
uid=1000(www-data) gid=33(www-data) groups=33(www-data)
Which is locally is assigned to the www-data group/user. This process seems to change ownership based on the GID, changing the www-data user's GID to something else still maps my folder to 33.
Not running node does not cause this issue.
I'm also able to replicate this issue on Ubuntu 18.04 (but not on MacOS). The key part of the difference between the logs for
For some reason in the node container the gid 1000 already exists so it can't be mapped:
Full log for
See the carbon Dockerfile where they add the node user with uid/gid 1000: https://github.com/nodejs/docker-node/blob/526c6e618300bdda0da4b3159df682cae83e14aa/8/jessie/Dockerfile
I was able to add
BUT! This is definitely going to be a problem for other Linux users running Lando with a Node container. The result of which will be their
@tanc no worries, I think you're likely right on this one, I've just been monstrously busy with client work. I tagged this for RC2 and put it in the backlog.
If you'd like to take a crack at the fix to speed it along you can find the user perms script here: https://github.com/lando/lando/blob/master/plugins/lando-engine/scripts/user-perms.sh
Thanks for your efforts as of late, I appreciate them!