owner/group getting set to `82`

Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
Here's a real weird one for ya. :D
The Issue
I am running a Lando dev environment on a simple dummy LAMP application, as a way to test my custom Lando plugin (working off the console branch). (Lando is a tool for running local dev environments, with goals similar to Vagrant but built atop Docker Compose.)
Every once in a while - I have not discerned a pattern yet - running a lando command such as lando start, lando info, or lando stop from within my app directory, ~/workspace/lamp, will set the owner and group of that working directory to 82. When this happens, it also applies the same ownership/group to ~/.lando, Lando's directory for userland config and data files. There is no such user or group on my machine.
~/workspace/lamp $ ls -la
total 64
drwxrwxr-x 5 82 82 4096 Dec 10 19:14 .
drwxr-xr-x 36 ctamayo ctamayo 4096 Dec 13 12:11 ..
-rw-r--r-- 1 82 82 289 Nov 3 17:45 composer.json
-rw-r--r-- 1 82 82 4064 Nov 3 17:45 composer.lock
-rw-rw-r-- 1 82 82 45 Nov 3 17:58 .env
drwxrwxr-x 8 82 82 4096 Dec 10 19:14 .git
-rw-rw-r-- 1 82 82 35 Nov 3 17:46 .gitignore
-rw-rw-r-- 1 82 82 284 Dec 8 16:52 .lando.yml
-rw-rw-r-- 1 82 82 22770 Dec 15 09:51 stderr.log
drwxr-xr-x 5 82 82 4096 Nov 3 17:45 vendor
drwxrwxr-x 2 82 82 4096 Nov 3 18:09 www
~/workspace/lamp $ cd ~/.lando
~/.lando $ ls -la
total 52
drwxrwxr-x 10 82 82 4096 Dec 8 16:57 .
drwx------ 79 82 82 4096 Dec 15 10:49 ..
-rw-rw-r-- 1 82 82 670 Dec 8 16:05 appRegistry.json
drwxrwxr-x 2 82 82 4096 Nov 27 20:53 cache
-rw-rw-r-- 1 82 82 171 Dec 8 16:57 config.yml
-rw-rw-r-- 1 82 82 36 Oct 24 10:59 .instance.id
drwxr-xr-x 3 82 82 4096 Oct 24 13:15 keys
drwxrwxr-x 2 82 82 4096 Oct 24 11:55 logs
drwxrwxr-x 2 82 82 4096 Dec 1 09:57 plugins
drwxrwxr-x 2 82 82 4096 Oct 24 11:04 proxy
drwxrwxr-x 3 82 82 4096 Oct 24 10:59 services
drwxrwxr-x 17 82 82 4096 Nov 21 10:38 tmp
drwxrwxr-x 2 82 82 4096 Oct 24 12:55 util
~/.lando $ sudo grep 82 /etc/passwd
~/.lando $ groups
ctamayo adm cdrom sudo dip plugdev lpadmin sambashare docker
~/.lando $ sudo groups
root
~/.lando $
Troubleshooting, v1.0
Using strace, I have tried pinpointing the system call that makes these changes. I am an strace n00b so I may be doing it wrong, but here's my debugging technique so far...
I put this helper script in my path that just runs the lando commands over and over until they fail (I also have not yet discerned a pattern in how long it takes to fail, or which command it fails on):
#!/bin/bash
set -e
while :
do
echo starting lando
lando start
echo lando info
lando info
echo stopping lando
lando stop
done
I run this and pipe stderr into the file stderr.log...
~/workspace/lamp $ strace 2>stderr.log testlando.bash
...while tailing that file looking for 82 or chown in another window:
~/workspace/lamp $ tail -f tail -f stderr.log | egrep 'b82b|chown'
# .........wait forever........
Surprisingly, there is literally no output of the tail command (^1), despite the fact that my bash script eventually fails and the ownership and group are set on the two directories as described above.
(The single exception I've seen is this output, which I think is purely coincidental: --- SIGCHLD si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=9941, si_uid=1000, si_status=0, si_utime=82, si_stime=6 ---)
The output of the bash script (originating from the lando commands within - including tons of debug output from my Lando plugin) is always something like:
starting lando
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME lamp
LOCATION /home/ctamayo/workspace/lamp
SERVICES appserver, database, cache, queue, console
APPSERVER URLS https://localhost:32788
http://localhost:32789
http://lamp.lndo.site:8000
https://lamp.lndo.site
CONSOLE URLS http://beanstalk.lamp.lndo.site:8000
https://beanstalk.lamp.lndo.site
lando info
beanstalkd info
image: 'schickling/beanstalkd:latest',
ports: [ '11333:11300' ],
command: 'beanstalkd -p 11300',
entrypoint: '/lando-entrypoint.sh',
volumes:
[ '$LANDO_ENGINE_SCRIPTS_DIR/lando-entrypoint.sh:/lando-entrypoint.sh',
'$LANDO_APP_ROOT_BIND:/app',
'$LANDO_ENGINE_HOME:/user',
'$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'queue',
LANDO_SERVICE_TYPE: 'beanstalkd',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data', '$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'console',
LANDO_SERVICE_TYPE: 'beanstalkd_console',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data',
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
type: 'beanstalkd',
portforward: 11333,
_app: 'lamp',
_root: '/home/ctamayo/workspace/lamp',
_mount: '/app',
version: 'latest'
console info
image: 'schickling/beanstalkd-console:latest',
ports: [ 2080 ],
command: 'php -S 0.0.0.0:2080 -t /source/public',
entrypoint: '/lando-entrypoint.sh',
volumes:
[ '$LANDO_ENGINE_SCRIPTS_DIR/lando-entrypoint.sh:/lando-entrypoint.sh',
'$LANDO_APP_ROOT_BIND:/app',
'$LANDO_ENGINE_HOME:/user',
'$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'console',
LANDO_SERVICE_TYPE: 'beanstalkd_console',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data',
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
type: 'beanstalkd_console',
_app: 'lamp',
_root: '/home/ctamayo/workspace/lamp',
_mount: '/app',
version: 'latest'
undefined
"appserver":
"type": "php",
"version": "7.1",
"via": "apache",
"webroot": "www",
"urls": [
"https://localhost:32788",
"http://localhost:32789",
"http://lamp.lndo.site:8000",
"https://lamp.lndo.site"
]
,
"database":
"type": "mysql",
"version": "latest",
"creds":
"user": "lamp",
"password": "lamp",
"database": "lamp"
,
"internal_connection":
"host": "database",
"port": 3306
,
"external_connection":
"host": "localhost",
"port": "32773"
,
"cache":
"type": "redis",
"version": "latest",
"internal_connection":
"host": "cache",
"port": 6379
,
"external_connection":
"host": "localhost",
"port": "not forwarded"
,
"queue":
"type": "beanstalkd",
"version": "latest",
"internal_connection":
"host": "queue",
"port": 11300
,
"external_connection":
"host": "localhost",
"port": "11333"
,
"console":
"type": "beanstalkd_console",
"version": "latest",
"internal_connection":
"host": "console",
"port": 2080
,
"external_connection":
"host": "localhost",
"port": 2080
,
"urls": [
"http://beanstalk.lamp.lndo.site:8000",
"https://beanstalk.lamp.lndo.site"
]
stopping lando
App stopped!
starting lando
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME lamp
LOCATION /home/ctamayo/workspace/lamp
SERVICES appserver, database, cache, queue, console
APPSERVER URLS https://localhost:32797
http://localhost:32798
http://lamp.lndo.site:8000
https://lamp.lndo.site
CONSOLE URLS http://beanstalk.lamp.lndo.site:8000
https://beanstalk.lamp.lndo.site
lando info
No error messages directly in here, it just fails and stops. When I run lando start again, I get:
error: Error: EACCES: permission denied, open '/home/ctamayo/.lando/services/config/scripts/add-cert.sh'
at Error (native)
at Object.fs.openSync (fs.js:642:18)
at copyFileSync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:16:16)
at copySync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:85:7)
at /usr/lib/lando/node_modules/fs-extra/lib/copy.js:91:7
at Array.forEach (native)
at Object.copySync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:90:14)
at moveConfig (/usr/lib/lando/plugins/lando-services/lib/services.js:65:10)
at module.exports (/usr/lib/lando/plugins/lando-services/lib/services.js:134:16)
at AsyncEvents.<anonymous> (/usr/lib/lando/plugins/lando-services/lib/bootstrap.js:21:43)
at AsyncEvents.handle (/usr/lib/lando/lib/events.js:109:19)
at /usr/lib/lando/lib/events.js:170:19
at tryCatcher (/usr/lib/lando/node_modules/bluebird/js/release/util.js:16:23)
at Object.gotValue (/usr/lib/lando/node_modules/bluebird/js/release/reduce.js:155:18)
at Object.gotAccum (/usr/lib/lando/node_modules/bluebird/js/release/reduce.js:144:25)
at Object.tryCatcher (/usr/lib/lando/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/usr/lib/lando/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/lib/lando/node_modules/bluebird/js/release/async.js:143:10)
NOTE: This only happens when I tell Lando to run the plugin via
~/.lando/config.yml (see below). Without that plugin referenced, the bash script runs for hours without stopping.Questions Abound
How do I go about further debugging stuff? Do I need to call strace from within my bash script? Is there some other system call besides chown and friends that might be doing this? And just what the heck is the significance of 82?

Thanks in advance (for all the fish).
Lando config stuff
Not sure how relevant this will end up being, but here is my LAMP application's Lando config:
# ~/workspace/lamp/.lando.yml
name: lamp
recipe: lamp
config:
webroot: www
services:
cache:
type: redis
persist: true
queue:
type: beanstalkd
portforward: 11333
console:
type: beanstalkd_console
proxy:
console:
- beanstalk.lamp.lndo.site
tooling:
redis-cli:
service: cache
And my ~/.lando/config file, which tells lando to load my custom lando-beanstalkd plugin (which lives in ~/.lando/plugins/lando-beanstalkd):
plugins:
- lando-core
- lando-events
- lando-proxy
- lando-recipes
- lando-services
- lando-tooling
- lando-beanstalkd
logLevelConsole: warn
logLevel: debug
UPDATE: Troubleshooting v2.0
So. The plot thickens. It's changing ownership on my ~/.ssh directory as well.
total 44
drwxr-xr-x 2 82 82 4096 Nov 28 14:40 .
drwx------ 79 ctamayo ctamayo 4096 Dec 15 15:06 ..
-rw------- 1 82 82 472 Nov 28 14:40 config
-rw------- 1 82 82 1766 Jun 19 13:20 id_rsa
-rw-r--r-- 1 82 82 410 Jun 19 13:20 id_rsa.pub
-rw-r--r-- 1 82 82 14600 Nov 28 14:40 known_hosts
-rwx------ 1 82 82 3239 Oct 24 12:31 lando_rsa
-rw-r--r-- 1 82 82 750 Oct 24 12:31 lando_rsa.pub
Like, WTF.
Anyway, just to throw this out there, there are zero references to chown, chmod, or chgrp in my plugin code. There are a few in Lando itself. Those first couple GitHub search results seemed relevant, so I added this code to the sh scripts (load-keys.sh and user-perms.sh) in question:
if [ $LANDO_WEBROOT_USER = 82 ]; then
echo '$LANDO_WEBROOT_USER is 82! Bailing...'
exit 1
fi
if [ $LANDO_WEBROOT_GROUP = 82 ]; then
echo '$LANDO_WEBROOT_GROUP is 82! Bailing...'
exit 1
fi
Running my bash script again produces the same output. No mention of either $LANDO_WEBROOT_USER or $LANDO_WEBROOT_GROUP. Those scripts seem to run inside of a container, though, so their output may be suppressed...stay tuned for more...
group chown ownership
add a comment |Â
up vote
3
down vote
favorite
Here's a real weird one for ya. :D
The Issue
I am running a Lando dev environment on a simple dummy LAMP application, as a way to test my custom Lando plugin (working off the console branch). (Lando is a tool for running local dev environments, with goals similar to Vagrant but built atop Docker Compose.)
Every once in a while - I have not discerned a pattern yet - running a lando command such as lando start, lando info, or lando stop from within my app directory, ~/workspace/lamp, will set the owner and group of that working directory to 82. When this happens, it also applies the same ownership/group to ~/.lando, Lando's directory for userland config and data files. There is no such user or group on my machine.
~/workspace/lamp $ ls -la
total 64
drwxrwxr-x 5 82 82 4096 Dec 10 19:14 .
drwxr-xr-x 36 ctamayo ctamayo 4096 Dec 13 12:11 ..
-rw-r--r-- 1 82 82 289 Nov 3 17:45 composer.json
-rw-r--r-- 1 82 82 4064 Nov 3 17:45 composer.lock
-rw-rw-r-- 1 82 82 45 Nov 3 17:58 .env
drwxrwxr-x 8 82 82 4096 Dec 10 19:14 .git
-rw-rw-r-- 1 82 82 35 Nov 3 17:46 .gitignore
-rw-rw-r-- 1 82 82 284 Dec 8 16:52 .lando.yml
-rw-rw-r-- 1 82 82 22770 Dec 15 09:51 stderr.log
drwxr-xr-x 5 82 82 4096 Nov 3 17:45 vendor
drwxrwxr-x 2 82 82 4096 Nov 3 18:09 www
~/workspace/lamp $ cd ~/.lando
~/.lando $ ls -la
total 52
drwxrwxr-x 10 82 82 4096 Dec 8 16:57 .
drwx------ 79 82 82 4096 Dec 15 10:49 ..
-rw-rw-r-- 1 82 82 670 Dec 8 16:05 appRegistry.json
drwxrwxr-x 2 82 82 4096 Nov 27 20:53 cache
-rw-rw-r-- 1 82 82 171 Dec 8 16:57 config.yml
-rw-rw-r-- 1 82 82 36 Oct 24 10:59 .instance.id
drwxr-xr-x 3 82 82 4096 Oct 24 13:15 keys
drwxrwxr-x 2 82 82 4096 Oct 24 11:55 logs
drwxrwxr-x 2 82 82 4096 Dec 1 09:57 plugins
drwxrwxr-x 2 82 82 4096 Oct 24 11:04 proxy
drwxrwxr-x 3 82 82 4096 Oct 24 10:59 services
drwxrwxr-x 17 82 82 4096 Nov 21 10:38 tmp
drwxrwxr-x 2 82 82 4096 Oct 24 12:55 util
~/.lando $ sudo grep 82 /etc/passwd
~/.lando $ groups
ctamayo adm cdrom sudo dip plugdev lpadmin sambashare docker
~/.lando $ sudo groups
root
~/.lando $
Troubleshooting, v1.0
Using strace, I have tried pinpointing the system call that makes these changes. I am an strace n00b so I may be doing it wrong, but here's my debugging technique so far...
I put this helper script in my path that just runs the lando commands over and over until they fail (I also have not yet discerned a pattern in how long it takes to fail, or which command it fails on):
#!/bin/bash
set -e
while :
do
echo starting lando
lando start
echo lando info
lando info
echo stopping lando
lando stop
done
I run this and pipe stderr into the file stderr.log...
~/workspace/lamp $ strace 2>stderr.log testlando.bash
...while tailing that file looking for 82 or chown in another window:
~/workspace/lamp $ tail -f tail -f stderr.log | egrep 'b82b|chown'
# .........wait forever........
Surprisingly, there is literally no output of the tail command (^1), despite the fact that my bash script eventually fails and the ownership and group are set on the two directories as described above.
(The single exception I've seen is this output, which I think is purely coincidental: --- SIGCHLD si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=9941, si_uid=1000, si_status=0, si_utime=82, si_stime=6 ---)
The output of the bash script (originating from the lando commands within - including tons of debug output from my Lando plugin) is always something like:
starting lando
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME lamp
LOCATION /home/ctamayo/workspace/lamp
SERVICES appserver, database, cache, queue, console
APPSERVER URLS https://localhost:32788
http://localhost:32789
http://lamp.lndo.site:8000
https://lamp.lndo.site
CONSOLE URLS http://beanstalk.lamp.lndo.site:8000
https://beanstalk.lamp.lndo.site
lando info
beanstalkd info
image: 'schickling/beanstalkd:latest',
ports: [ '11333:11300' ],
command: 'beanstalkd -p 11300',
entrypoint: '/lando-entrypoint.sh',
volumes:
[ '$LANDO_ENGINE_SCRIPTS_DIR/lando-entrypoint.sh:/lando-entrypoint.sh',
'$LANDO_APP_ROOT_BIND:/app',
'$LANDO_ENGINE_HOME:/user',
'$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'queue',
LANDO_SERVICE_TYPE: 'beanstalkd',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data', '$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'console',
LANDO_SERVICE_TYPE: 'beanstalkd_console',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data',
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
type: 'beanstalkd',
portforward: 11333,
_app: 'lamp',
_root: '/home/ctamayo/workspace/lamp',
_mount: '/app',
version: 'latest'
console info
image: 'schickling/beanstalkd-console:latest',
ports: [ 2080 ],
command: 'php -S 0.0.0.0:2080 -t /source/public',
entrypoint: '/lando-entrypoint.sh',
volumes:
[ '$LANDO_ENGINE_SCRIPTS_DIR/lando-entrypoint.sh:/lando-entrypoint.sh',
'$LANDO_APP_ROOT_BIND:/app',
'$LANDO_ENGINE_HOME:/user',
'$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'console',
LANDO_SERVICE_TYPE: 'beanstalkd_console',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data',
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
type: 'beanstalkd_console',
_app: 'lamp',
_root: '/home/ctamayo/workspace/lamp',
_mount: '/app',
version: 'latest'
undefined
"appserver":
"type": "php",
"version": "7.1",
"via": "apache",
"webroot": "www",
"urls": [
"https://localhost:32788",
"http://localhost:32789",
"http://lamp.lndo.site:8000",
"https://lamp.lndo.site"
]
,
"database":
"type": "mysql",
"version": "latest",
"creds":
"user": "lamp",
"password": "lamp",
"database": "lamp"
,
"internal_connection":
"host": "database",
"port": 3306
,
"external_connection":
"host": "localhost",
"port": "32773"
,
"cache":
"type": "redis",
"version": "latest",
"internal_connection":
"host": "cache",
"port": 6379
,
"external_connection":
"host": "localhost",
"port": "not forwarded"
,
"queue":
"type": "beanstalkd",
"version": "latest",
"internal_connection":
"host": "queue",
"port": 11300
,
"external_connection":
"host": "localhost",
"port": "11333"
,
"console":
"type": "beanstalkd_console",
"version": "latest",
"internal_connection":
"host": "console",
"port": 2080
,
"external_connection":
"host": "localhost",
"port": 2080
,
"urls": [
"http://beanstalk.lamp.lndo.site:8000",
"https://beanstalk.lamp.lndo.site"
]
stopping lando
App stopped!
starting lando
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME lamp
LOCATION /home/ctamayo/workspace/lamp
SERVICES appserver, database, cache, queue, console
APPSERVER URLS https://localhost:32797
http://localhost:32798
http://lamp.lndo.site:8000
https://lamp.lndo.site
CONSOLE URLS http://beanstalk.lamp.lndo.site:8000
https://beanstalk.lamp.lndo.site
lando info
No error messages directly in here, it just fails and stops. When I run lando start again, I get:
error: Error: EACCES: permission denied, open '/home/ctamayo/.lando/services/config/scripts/add-cert.sh'
at Error (native)
at Object.fs.openSync (fs.js:642:18)
at copyFileSync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:16:16)
at copySync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:85:7)
at /usr/lib/lando/node_modules/fs-extra/lib/copy.js:91:7
at Array.forEach (native)
at Object.copySync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:90:14)
at moveConfig (/usr/lib/lando/plugins/lando-services/lib/services.js:65:10)
at module.exports (/usr/lib/lando/plugins/lando-services/lib/services.js:134:16)
at AsyncEvents.<anonymous> (/usr/lib/lando/plugins/lando-services/lib/bootstrap.js:21:43)
at AsyncEvents.handle (/usr/lib/lando/lib/events.js:109:19)
at /usr/lib/lando/lib/events.js:170:19
at tryCatcher (/usr/lib/lando/node_modules/bluebird/js/release/util.js:16:23)
at Object.gotValue (/usr/lib/lando/node_modules/bluebird/js/release/reduce.js:155:18)
at Object.gotAccum (/usr/lib/lando/node_modules/bluebird/js/release/reduce.js:144:25)
at Object.tryCatcher (/usr/lib/lando/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/usr/lib/lando/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/lib/lando/node_modules/bluebird/js/release/async.js:143:10)
NOTE: This only happens when I tell Lando to run the plugin via
~/.lando/config.yml (see below). Without that plugin referenced, the bash script runs for hours without stopping.Questions Abound
How do I go about further debugging stuff? Do I need to call strace from within my bash script? Is there some other system call besides chown and friends that might be doing this? And just what the heck is the significance of 82?

Thanks in advance (for all the fish).
Lando config stuff
Not sure how relevant this will end up being, but here is my LAMP application's Lando config:
# ~/workspace/lamp/.lando.yml
name: lamp
recipe: lamp
config:
webroot: www
services:
cache:
type: redis
persist: true
queue:
type: beanstalkd
portforward: 11333
console:
type: beanstalkd_console
proxy:
console:
- beanstalk.lamp.lndo.site
tooling:
redis-cli:
service: cache
And my ~/.lando/config file, which tells lando to load my custom lando-beanstalkd plugin (which lives in ~/.lando/plugins/lando-beanstalkd):
plugins:
- lando-core
- lando-events
- lando-proxy
- lando-recipes
- lando-services
- lando-tooling
- lando-beanstalkd
logLevelConsole: warn
logLevel: debug
UPDATE: Troubleshooting v2.0
So. The plot thickens. It's changing ownership on my ~/.ssh directory as well.
total 44
drwxr-xr-x 2 82 82 4096 Nov 28 14:40 .
drwx------ 79 ctamayo ctamayo 4096 Dec 15 15:06 ..
-rw------- 1 82 82 472 Nov 28 14:40 config
-rw------- 1 82 82 1766 Jun 19 13:20 id_rsa
-rw-r--r-- 1 82 82 410 Jun 19 13:20 id_rsa.pub
-rw-r--r-- 1 82 82 14600 Nov 28 14:40 known_hosts
-rwx------ 1 82 82 3239 Oct 24 12:31 lando_rsa
-rw-r--r-- 1 82 82 750 Oct 24 12:31 lando_rsa.pub
Like, WTF.
Anyway, just to throw this out there, there are zero references to chown, chmod, or chgrp in my plugin code. There are a few in Lando itself. Those first couple GitHub search results seemed relevant, so I added this code to the sh scripts (load-keys.sh and user-perms.sh) in question:
if [ $LANDO_WEBROOT_USER = 82 ]; then
echo '$LANDO_WEBROOT_USER is 82! Bailing...'
exit 1
fi
if [ $LANDO_WEBROOT_GROUP = 82 ]; then
echo '$LANDO_WEBROOT_GROUP is 82! Bailing...'
exit 1
fi
Running my bash script again produces the same output. No mention of either $LANDO_WEBROOT_USER or $LANDO_WEBROOT_GROUP. Those scripts seem to run inside of a container, though, so their output may be suppressed...stay tuned for more...
group chown ownership
82 is the default user for www-data for nginx and apache in alpine linux, probably used by your containers. lando scripts/user-perms.sh does a chown -R to set the lando mount folder to lando settings (LANDO_WEBROOT_USER:LANDO_WEBROOT_GROUP) so that's probably applying to your host directory mount.
â troseman
Aug 13 at 18:48
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Here's a real weird one for ya. :D
The Issue
I am running a Lando dev environment on a simple dummy LAMP application, as a way to test my custom Lando plugin (working off the console branch). (Lando is a tool for running local dev environments, with goals similar to Vagrant but built atop Docker Compose.)
Every once in a while - I have not discerned a pattern yet - running a lando command such as lando start, lando info, or lando stop from within my app directory, ~/workspace/lamp, will set the owner and group of that working directory to 82. When this happens, it also applies the same ownership/group to ~/.lando, Lando's directory for userland config and data files. There is no such user or group on my machine.
~/workspace/lamp $ ls -la
total 64
drwxrwxr-x 5 82 82 4096 Dec 10 19:14 .
drwxr-xr-x 36 ctamayo ctamayo 4096 Dec 13 12:11 ..
-rw-r--r-- 1 82 82 289 Nov 3 17:45 composer.json
-rw-r--r-- 1 82 82 4064 Nov 3 17:45 composer.lock
-rw-rw-r-- 1 82 82 45 Nov 3 17:58 .env
drwxrwxr-x 8 82 82 4096 Dec 10 19:14 .git
-rw-rw-r-- 1 82 82 35 Nov 3 17:46 .gitignore
-rw-rw-r-- 1 82 82 284 Dec 8 16:52 .lando.yml
-rw-rw-r-- 1 82 82 22770 Dec 15 09:51 stderr.log
drwxr-xr-x 5 82 82 4096 Nov 3 17:45 vendor
drwxrwxr-x 2 82 82 4096 Nov 3 18:09 www
~/workspace/lamp $ cd ~/.lando
~/.lando $ ls -la
total 52
drwxrwxr-x 10 82 82 4096 Dec 8 16:57 .
drwx------ 79 82 82 4096 Dec 15 10:49 ..
-rw-rw-r-- 1 82 82 670 Dec 8 16:05 appRegistry.json
drwxrwxr-x 2 82 82 4096 Nov 27 20:53 cache
-rw-rw-r-- 1 82 82 171 Dec 8 16:57 config.yml
-rw-rw-r-- 1 82 82 36 Oct 24 10:59 .instance.id
drwxr-xr-x 3 82 82 4096 Oct 24 13:15 keys
drwxrwxr-x 2 82 82 4096 Oct 24 11:55 logs
drwxrwxr-x 2 82 82 4096 Dec 1 09:57 plugins
drwxrwxr-x 2 82 82 4096 Oct 24 11:04 proxy
drwxrwxr-x 3 82 82 4096 Oct 24 10:59 services
drwxrwxr-x 17 82 82 4096 Nov 21 10:38 tmp
drwxrwxr-x 2 82 82 4096 Oct 24 12:55 util
~/.lando $ sudo grep 82 /etc/passwd
~/.lando $ groups
ctamayo adm cdrom sudo dip plugdev lpadmin sambashare docker
~/.lando $ sudo groups
root
~/.lando $
Troubleshooting, v1.0
Using strace, I have tried pinpointing the system call that makes these changes. I am an strace n00b so I may be doing it wrong, but here's my debugging technique so far...
I put this helper script in my path that just runs the lando commands over and over until they fail (I also have not yet discerned a pattern in how long it takes to fail, or which command it fails on):
#!/bin/bash
set -e
while :
do
echo starting lando
lando start
echo lando info
lando info
echo stopping lando
lando stop
done
I run this and pipe stderr into the file stderr.log...
~/workspace/lamp $ strace 2>stderr.log testlando.bash
...while tailing that file looking for 82 or chown in another window:
~/workspace/lamp $ tail -f tail -f stderr.log | egrep 'b82b|chown'
# .........wait forever........
Surprisingly, there is literally no output of the tail command (^1), despite the fact that my bash script eventually fails and the ownership and group are set on the two directories as described above.
(The single exception I've seen is this output, which I think is purely coincidental: --- SIGCHLD si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=9941, si_uid=1000, si_status=0, si_utime=82, si_stime=6 ---)
The output of the bash script (originating from the lando commands within - including tons of debug output from my Lando plugin) is always something like:
starting lando
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME lamp
LOCATION /home/ctamayo/workspace/lamp
SERVICES appserver, database, cache, queue, console
APPSERVER URLS https://localhost:32788
http://localhost:32789
http://lamp.lndo.site:8000
https://lamp.lndo.site
CONSOLE URLS http://beanstalk.lamp.lndo.site:8000
https://beanstalk.lamp.lndo.site
lando info
beanstalkd info
image: 'schickling/beanstalkd:latest',
ports: [ '11333:11300' ],
command: 'beanstalkd -p 11300',
entrypoint: '/lando-entrypoint.sh',
volumes:
[ '$LANDO_ENGINE_SCRIPTS_DIR/lando-entrypoint.sh:/lando-entrypoint.sh',
'$LANDO_APP_ROOT_BIND:/app',
'$LANDO_ENGINE_HOME:/user',
'$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'queue',
LANDO_SERVICE_TYPE: 'beanstalkd',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data', '$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'console',
LANDO_SERVICE_TYPE: 'beanstalkd_console',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data',
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
type: 'beanstalkd',
portforward: 11333,
_app: 'lamp',
_root: '/home/ctamayo/workspace/lamp',
_mount: '/app',
version: 'latest'
console info
image: 'schickling/beanstalkd-console:latest',
ports: [ 2080 ],
command: 'php -S 0.0.0.0:2080 -t /source/public',
entrypoint: '/lando-entrypoint.sh',
volumes:
[ '$LANDO_ENGINE_SCRIPTS_DIR/lando-entrypoint.sh:/lando-entrypoint.sh',
'$LANDO_APP_ROOT_BIND:/app',
'$LANDO_ENGINE_HOME:/user',
'$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'console',
LANDO_SERVICE_TYPE: 'beanstalkd_console',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data',
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
type: 'beanstalkd_console',
_app: 'lamp',
_root: '/home/ctamayo/workspace/lamp',
_mount: '/app',
version: 'latest'
undefined
"appserver":
"type": "php",
"version": "7.1",
"via": "apache",
"webroot": "www",
"urls": [
"https://localhost:32788",
"http://localhost:32789",
"http://lamp.lndo.site:8000",
"https://lamp.lndo.site"
]
,
"database":
"type": "mysql",
"version": "latest",
"creds":
"user": "lamp",
"password": "lamp",
"database": "lamp"
,
"internal_connection":
"host": "database",
"port": 3306
,
"external_connection":
"host": "localhost",
"port": "32773"
,
"cache":
"type": "redis",
"version": "latest",
"internal_connection":
"host": "cache",
"port": 6379
,
"external_connection":
"host": "localhost",
"port": "not forwarded"
,
"queue":
"type": "beanstalkd",
"version": "latest",
"internal_connection":
"host": "queue",
"port": 11300
,
"external_connection":
"host": "localhost",
"port": "11333"
,
"console":
"type": "beanstalkd_console",
"version": "latest",
"internal_connection":
"host": "console",
"port": 2080
,
"external_connection":
"host": "localhost",
"port": 2080
,
"urls": [
"http://beanstalk.lamp.lndo.site:8000",
"https://beanstalk.lamp.lndo.site"
]
stopping lando
App stopped!
starting lando
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME lamp
LOCATION /home/ctamayo/workspace/lamp
SERVICES appserver, database, cache, queue, console
APPSERVER URLS https://localhost:32797
http://localhost:32798
http://lamp.lndo.site:8000
https://lamp.lndo.site
CONSOLE URLS http://beanstalk.lamp.lndo.site:8000
https://beanstalk.lamp.lndo.site
lando info
No error messages directly in here, it just fails and stops. When I run lando start again, I get:
error: Error: EACCES: permission denied, open '/home/ctamayo/.lando/services/config/scripts/add-cert.sh'
at Error (native)
at Object.fs.openSync (fs.js:642:18)
at copyFileSync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:16:16)
at copySync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:85:7)
at /usr/lib/lando/node_modules/fs-extra/lib/copy.js:91:7
at Array.forEach (native)
at Object.copySync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:90:14)
at moveConfig (/usr/lib/lando/plugins/lando-services/lib/services.js:65:10)
at module.exports (/usr/lib/lando/plugins/lando-services/lib/services.js:134:16)
at AsyncEvents.<anonymous> (/usr/lib/lando/plugins/lando-services/lib/bootstrap.js:21:43)
at AsyncEvents.handle (/usr/lib/lando/lib/events.js:109:19)
at /usr/lib/lando/lib/events.js:170:19
at tryCatcher (/usr/lib/lando/node_modules/bluebird/js/release/util.js:16:23)
at Object.gotValue (/usr/lib/lando/node_modules/bluebird/js/release/reduce.js:155:18)
at Object.gotAccum (/usr/lib/lando/node_modules/bluebird/js/release/reduce.js:144:25)
at Object.tryCatcher (/usr/lib/lando/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/usr/lib/lando/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/lib/lando/node_modules/bluebird/js/release/async.js:143:10)
NOTE: This only happens when I tell Lando to run the plugin via
~/.lando/config.yml (see below). Without that plugin referenced, the bash script runs for hours without stopping.Questions Abound
How do I go about further debugging stuff? Do I need to call strace from within my bash script? Is there some other system call besides chown and friends that might be doing this? And just what the heck is the significance of 82?

Thanks in advance (for all the fish).
Lando config stuff
Not sure how relevant this will end up being, but here is my LAMP application's Lando config:
# ~/workspace/lamp/.lando.yml
name: lamp
recipe: lamp
config:
webroot: www
services:
cache:
type: redis
persist: true
queue:
type: beanstalkd
portforward: 11333
console:
type: beanstalkd_console
proxy:
console:
- beanstalk.lamp.lndo.site
tooling:
redis-cli:
service: cache
And my ~/.lando/config file, which tells lando to load my custom lando-beanstalkd plugin (which lives in ~/.lando/plugins/lando-beanstalkd):
plugins:
- lando-core
- lando-events
- lando-proxy
- lando-recipes
- lando-services
- lando-tooling
- lando-beanstalkd
logLevelConsole: warn
logLevel: debug
UPDATE: Troubleshooting v2.0
So. The plot thickens. It's changing ownership on my ~/.ssh directory as well.
total 44
drwxr-xr-x 2 82 82 4096 Nov 28 14:40 .
drwx------ 79 ctamayo ctamayo 4096 Dec 15 15:06 ..
-rw------- 1 82 82 472 Nov 28 14:40 config
-rw------- 1 82 82 1766 Jun 19 13:20 id_rsa
-rw-r--r-- 1 82 82 410 Jun 19 13:20 id_rsa.pub
-rw-r--r-- 1 82 82 14600 Nov 28 14:40 known_hosts
-rwx------ 1 82 82 3239 Oct 24 12:31 lando_rsa
-rw-r--r-- 1 82 82 750 Oct 24 12:31 lando_rsa.pub
Like, WTF.
Anyway, just to throw this out there, there are zero references to chown, chmod, or chgrp in my plugin code. There are a few in Lando itself. Those first couple GitHub search results seemed relevant, so I added this code to the sh scripts (load-keys.sh and user-perms.sh) in question:
if [ $LANDO_WEBROOT_USER = 82 ]; then
echo '$LANDO_WEBROOT_USER is 82! Bailing...'
exit 1
fi
if [ $LANDO_WEBROOT_GROUP = 82 ]; then
echo '$LANDO_WEBROOT_GROUP is 82! Bailing...'
exit 1
fi
Running my bash script again produces the same output. No mention of either $LANDO_WEBROOT_USER or $LANDO_WEBROOT_GROUP. Those scripts seem to run inside of a container, though, so their output may be suppressed...stay tuned for more...
group chown ownership
Here's a real weird one for ya. :D
The Issue
I am running a Lando dev environment on a simple dummy LAMP application, as a way to test my custom Lando plugin (working off the console branch). (Lando is a tool for running local dev environments, with goals similar to Vagrant but built atop Docker Compose.)
Every once in a while - I have not discerned a pattern yet - running a lando command such as lando start, lando info, or lando stop from within my app directory, ~/workspace/lamp, will set the owner and group of that working directory to 82. When this happens, it also applies the same ownership/group to ~/.lando, Lando's directory for userland config and data files. There is no such user or group on my machine.
~/workspace/lamp $ ls -la
total 64
drwxrwxr-x 5 82 82 4096 Dec 10 19:14 .
drwxr-xr-x 36 ctamayo ctamayo 4096 Dec 13 12:11 ..
-rw-r--r-- 1 82 82 289 Nov 3 17:45 composer.json
-rw-r--r-- 1 82 82 4064 Nov 3 17:45 composer.lock
-rw-rw-r-- 1 82 82 45 Nov 3 17:58 .env
drwxrwxr-x 8 82 82 4096 Dec 10 19:14 .git
-rw-rw-r-- 1 82 82 35 Nov 3 17:46 .gitignore
-rw-rw-r-- 1 82 82 284 Dec 8 16:52 .lando.yml
-rw-rw-r-- 1 82 82 22770 Dec 15 09:51 stderr.log
drwxr-xr-x 5 82 82 4096 Nov 3 17:45 vendor
drwxrwxr-x 2 82 82 4096 Nov 3 18:09 www
~/workspace/lamp $ cd ~/.lando
~/.lando $ ls -la
total 52
drwxrwxr-x 10 82 82 4096 Dec 8 16:57 .
drwx------ 79 82 82 4096 Dec 15 10:49 ..
-rw-rw-r-- 1 82 82 670 Dec 8 16:05 appRegistry.json
drwxrwxr-x 2 82 82 4096 Nov 27 20:53 cache
-rw-rw-r-- 1 82 82 171 Dec 8 16:57 config.yml
-rw-rw-r-- 1 82 82 36 Oct 24 10:59 .instance.id
drwxr-xr-x 3 82 82 4096 Oct 24 13:15 keys
drwxrwxr-x 2 82 82 4096 Oct 24 11:55 logs
drwxrwxr-x 2 82 82 4096 Dec 1 09:57 plugins
drwxrwxr-x 2 82 82 4096 Oct 24 11:04 proxy
drwxrwxr-x 3 82 82 4096 Oct 24 10:59 services
drwxrwxr-x 17 82 82 4096 Nov 21 10:38 tmp
drwxrwxr-x 2 82 82 4096 Oct 24 12:55 util
~/.lando $ sudo grep 82 /etc/passwd
~/.lando $ groups
ctamayo adm cdrom sudo dip plugdev lpadmin sambashare docker
~/.lando $ sudo groups
root
~/.lando $
Troubleshooting, v1.0
Using strace, I have tried pinpointing the system call that makes these changes. I am an strace n00b so I may be doing it wrong, but here's my debugging technique so far...
I put this helper script in my path that just runs the lando commands over and over until they fail (I also have not yet discerned a pattern in how long it takes to fail, or which command it fails on):
#!/bin/bash
set -e
while :
do
echo starting lando
lando start
echo lando info
lando info
echo stopping lando
lando stop
done
I run this and pipe stderr into the file stderr.log...
~/workspace/lamp $ strace 2>stderr.log testlando.bash
...while tailing that file looking for 82 or chown in another window:
~/workspace/lamp $ tail -f tail -f stderr.log | egrep 'b82b|chown'
# .........wait forever........
Surprisingly, there is literally no output of the tail command (^1), despite the fact that my bash script eventually fails and the ownership and group are set on the two directories as described above.
(The single exception I've seen is this output, which I think is purely coincidental: --- SIGCHLD si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=9941, si_uid=1000, si_status=0, si_utime=82, si_stime=6 ---)
The output of the bash script (originating from the lando commands within - including tons of debug output from my Lando plugin) is always something like:
starting lando
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME lamp
LOCATION /home/ctamayo/workspace/lamp
SERVICES appserver, database, cache, queue, console
APPSERVER URLS https://localhost:32788
http://localhost:32789
http://lamp.lndo.site:8000
https://lamp.lndo.site
CONSOLE URLS http://beanstalk.lamp.lndo.site:8000
https://beanstalk.lamp.lndo.site
lando info
beanstalkd info
image: 'schickling/beanstalkd:latest',
ports: [ '11333:11300' ],
command: 'beanstalkd -p 11300',
entrypoint: '/lando-entrypoint.sh',
volumes:
[ '$LANDO_ENGINE_SCRIPTS_DIR/lando-entrypoint.sh:/lando-entrypoint.sh',
'$LANDO_APP_ROOT_BIND:/app',
'$LANDO_ENGINE_HOME:/user',
'$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'queue',
LANDO_SERVICE_TYPE: 'beanstalkd',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data', '$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'console',
LANDO_SERVICE_TYPE: 'beanstalkd_console',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data',
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
type: 'beanstalkd',
portforward: 11333,
_app: 'lamp',
_root: '/home/ctamayo/workspace/lamp',
_mount: '/app',
version: 'latest'
console info
image: 'schickling/beanstalkd-console:latest',
ports: [ 2080 ],
command: 'php -S 0.0.0.0:2080 -t /source/public',
entrypoint: '/lando-entrypoint.sh',
volumes:
[ '$LANDO_ENGINE_SCRIPTS_DIR/lando-entrypoint.sh:/lando-entrypoint.sh',
'$LANDO_APP_ROOT_BIND:/app',
'$LANDO_ENGINE_HOME:/user',
'$LANDO_ENGINE_SCRIPTS_DIR/user-perms.sh:/user-perms.sh',
'/home/ctamayo/.lando/services/config/scripts/load-keys.sh:/scripts/load-keys.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-import.sh:/helpers/mysql-import.sh',
'/home/ctamayo/.lando/services/config/helpers/mysql-export.sh:/helpers/mysql-export.sh' ],
environment:
LANDO_SERVICE_NAME: 'console',
LANDO_SERVICE_TYPE: 'beanstalkd_console',
LANDO_MOUNT: '/app',
LANDO: 'ON',
LANDO_HOST_OS: 'linux',
LANDO_HOST_UID: '1000',
LANDO_HOST_GID: '1000',
LANDO_HOST_IP: '10.0.10.20',
LANDO_APP_ROOT: '/home/ctamayo/workspace/lamp',
LANDO_APP_NAME: 'lamp',
LANDO_WEBROOT_USER: 'www-data',
LANDO_WEBROOT_GROUP: 'www-data',
LANDO_WEBROOT_UID: '33',
LANDO_WEBROOT_GID: '33',
LANDO_LOAD_PP_KEYS: 'false',
COLUMNS: 256,
FOO: 'barrrrr',
REDIS_HOST: 'cache',
REDIS_PORT: '6379' ,
labels: 'io.lando.container': 'TRUE' ,
type: 'beanstalkd_console',
_app: 'lamp',
_root: '/home/ctamayo/workspace/lamp',
_mount: '/app',
version: 'latest'
undefined
"appserver":
"type": "php",
"version": "7.1",
"via": "apache",
"webroot": "www",
"urls": [
"https://localhost:32788",
"http://localhost:32789",
"http://lamp.lndo.site:8000",
"https://lamp.lndo.site"
]
,
"database":
"type": "mysql",
"version": "latest",
"creds":
"user": "lamp",
"password": "lamp",
"database": "lamp"
,
"internal_connection":
"host": "database",
"port": 3306
,
"external_connection":
"host": "localhost",
"port": "32773"
,
"cache":
"type": "redis",
"version": "latest",
"internal_connection":
"host": "cache",
"port": 6379
,
"external_connection":
"host": "localhost",
"port": "not forwarded"
,
"queue":
"type": "beanstalkd",
"version": "latest",
"internal_connection":
"host": "queue",
"port": 11300
,
"external_connection":
"host": "localhost",
"port": "11333"
,
"console":
"type": "beanstalkd_console",
"version": "latest",
"internal_connection":
"host": "console",
"port": 2080
,
"external_connection":
"host": "localhost",
"port": 2080
,
"urls": [
"http://beanstalk.lamp.lndo.site:8000",
"https://beanstalk.lamp.lndo.site"
]
stopping lando
App stopped!
starting lando
BOOMSHAKALAKA!!!
Your app has started up correctly.
Here are some vitals:
NAME lamp
LOCATION /home/ctamayo/workspace/lamp
SERVICES appserver, database, cache, queue, console
APPSERVER URLS https://localhost:32797
http://localhost:32798
http://lamp.lndo.site:8000
https://lamp.lndo.site
CONSOLE URLS http://beanstalk.lamp.lndo.site:8000
https://beanstalk.lamp.lndo.site
lando info
No error messages directly in here, it just fails and stops. When I run lando start again, I get:
error: Error: EACCES: permission denied, open '/home/ctamayo/.lando/services/config/scripts/add-cert.sh'
at Error (native)
at Object.fs.openSync (fs.js:642:18)
at copyFileSync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:16:16)
at copySync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:85:7)
at /usr/lib/lando/node_modules/fs-extra/lib/copy.js:91:7
at Array.forEach (native)
at Object.copySync (/usr/lib/lando/node_modules/fs-extra/lib/copy.js:90:14)
at moveConfig (/usr/lib/lando/plugins/lando-services/lib/services.js:65:10)
at module.exports (/usr/lib/lando/plugins/lando-services/lib/services.js:134:16)
at AsyncEvents.<anonymous> (/usr/lib/lando/plugins/lando-services/lib/bootstrap.js:21:43)
at AsyncEvents.handle (/usr/lib/lando/lib/events.js:109:19)
at /usr/lib/lando/lib/events.js:170:19
at tryCatcher (/usr/lib/lando/node_modules/bluebird/js/release/util.js:16:23)
at Object.gotValue (/usr/lib/lando/node_modules/bluebird/js/release/reduce.js:155:18)
at Object.gotAccum (/usr/lib/lando/node_modules/bluebird/js/release/reduce.js:144:25)
at Object.tryCatcher (/usr/lib/lando/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/lando/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/usr/lib/lando/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/lib/lando/node_modules/bluebird/js/release/async.js:143:10)
NOTE: This only happens when I tell Lando to run the plugin via
~/.lando/config.yml (see below). Without that plugin referenced, the bash script runs for hours without stopping.Questions Abound
How do I go about further debugging stuff? Do I need to call strace from within my bash script? Is there some other system call besides chown and friends that might be doing this? And just what the heck is the significance of 82?

Thanks in advance (for all the fish).
Lando config stuff
Not sure how relevant this will end up being, but here is my LAMP application's Lando config:
# ~/workspace/lamp/.lando.yml
name: lamp
recipe: lamp
config:
webroot: www
services:
cache:
type: redis
persist: true
queue:
type: beanstalkd
portforward: 11333
console:
type: beanstalkd_console
proxy:
console:
- beanstalk.lamp.lndo.site
tooling:
redis-cli:
service: cache
And my ~/.lando/config file, which tells lando to load my custom lando-beanstalkd plugin (which lives in ~/.lando/plugins/lando-beanstalkd):
plugins:
- lando-core
- lando-events
- lando-proxy
- lando-recipes
- lando-services
- lando-tooling
- lando-beanstalkd
logLevelConsole: warn
logLevel: debug
UPDATE: Troubleshooting v2.0
So. The plot thickens. It's changing ownership on my ~/.ssh directory as well.
total 44
drwxr-xr-x 2 82 82 4096 Nov 28 14:40 .
drwx------ 79 ctamayo ctamayo 4096 Dec 15 15:06 ..
-rw------- 1 82 82 472 Nov 28 14:40 config
-rw------- 1 82 82 1766 Jun 19 13:20 id_rsa
-rw-r--r-- 1 82 82 410 Jun 19 13:20 id_rsa.pub
-rw-r--r-- 1 82 82 14600 Nov 28 14:40 known_hosts
-rwx------ 1 82 82 3239 Oct 24 12:31 lando_rsa
-rw-r--r-- 1 82 82 750 Oct 24 12:31 lando_rsa.pub
Like, WTF.
Anyway, just to throw this out there, there are zero references to chown, chmod, or chgrp in my plugin code. There are a few in Lando itself. Those first couple GitHub search results seemed relevant, so I added this code to the sh scripts (load-keys.sh and user-perms.sh) in question:
if [ $LANDO_WEBROOT_USER = 82 ]; then
echo '$LANDO_WEBROOT_USER is 82! Bailing...'
exit 1
fi
if [ $LANDO_WEBROOT_GROUP = 82 ]; then
echo '$LANDO_WEBROOT_GROUP is 82! Bailing...'
exit 1
fi
Running my bash script again produces the same output. No mention of either $LANDO_WEBROOT_USER or $LANDO_WEBROOT_GROUP. Those scripts seem to run inside of a container, though, so their output may be suppressed...stay tuned for more...
group chown ownership
edited Dec 15 '17 at 23:17
asked Dec 15 '17 at 22:10
acobster
1163
1163
82 is the default user for www-data for nginx and apache in alpine linux, probably used by your containers. lando scripts/user-perms.sh does a chown -R to set the lando mount folder to lando settings (LANDO_WEBROOT_USER:LANDO_WEBROOT_GROUP) so that's probably applying to your host directory mount.
â troseman
Aug 13 at 18:48
add a comment |Â
82 is the default user for www-data for nginx and apache in alpine linux, probably used by your containers. lando scripts/user-perms.sh does a chown -R to set the lando mount folder to lando settings (LANDO_WEBROOT_USER:LANDO_WEBROOT_GROUP) so that's probably applying to your host directory mount.
â troseman
Aug 13 at 18:48
82 is the default user for www-data for nginx and apache in alpine linux, probably used by your containers. lando scripts/user-perms.sh does a chown -R to set the lando mount folder to lando settings (LANDO_WEBROOT_USER:LANDO_WEBROOT_GROUP) so that's probably applying to your host directory mount.
â troseman
Aug 13 at 18:48
82 is the default user for www-data for nginx and apache in alpine linux, probably used by your containers. lando scripts/user-perms.sh does a chown -R to set the lando mount folder to lando settings (LANDO_WEBROOT_USER:LANDO_WEBROOT_GROUP) so that's probably applying to your host directory mount.
â troseman
Aug 13 at 18:48
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f411158%2fowner-group-getting-set-to-82%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
82 is the default user for www-data for nginx and apache in alpine linux, probably used by your containers. lando scripts/user-perms.sh does a chown -R to set the lando mount folder to lando settings (LANDO_WEBROOT_USER:LANDO_WEBROOT_GROUP) so that's probably applying to your host directory mount.
â troseman
Aug 13 at 18:48