ddev: Error in `web` container on startup in Ubuntu Live session: failed to create symbolic link '/home/kubuntu/.nvm': Permission denied

Is there an existing issue for this?

  • I have searched the existing issues

Run a Diagnostic and Paste Link Here

https://gist.github.com/MurzNN/fcdc24a2d65bf9729f65d130855d60da

Expected Behavior

I’ve got a problem with starting the web container on clean Ubuntu 22.04 image, with this output in the logs:

+ phpenmod assert
+ ls /var/www/html
+ sudo mkdir -p /mnt/ddev-global-cache/terminus/cache
+ sudo mkdir -p /mnt/ddev-global-cache/bashhistory/drupal-web /mnt/ddev-global-cache/mysqlhistory/drupal-web /mnt/ddev-global-cache/nvm_dir/drupal-web /mnt/ddev-global-cache/npm/drupal-web /mnt/ddev-global-cache/yarn/drupal-web
++ id -u
++ id -g
+ sudo chown -R 999:999 /mnt/ddev-global-cache/ /var/lib/php
+ yarn config set cache-folder /mnt/ddev-global-cache/yarn/drupal-web
Error: ENOTDIR: not a directory, open '/dev/null/.config/yarn'
    at Object.openSync (node:fs:585:3)
    at readFileSync (node:fs:453:35)
    at /usr/lib/node_modules/yarn/lib/cli.js:97395:58
    at Array.map (<anonymous>)
    at parseRcPaths (/usr/lib/node_modules/yarn/lib/cli.js:97393:78)
    at Object.findRc (/usr/lib/node_modules/yarn/lib/cli.js:97407:10)
    at getRcConfigForCwd (/usr/lib/node_modules/yarn/lib/cli.js:56965:74)
    at /usr/lib/node_modules/yarn/lib/cli.js:88756:56
    at Generator.next (<anonymous>)
    at step (/usr/lib/node_modules/yarn/lib/cli.js:310:30)
+ yarn config set cacheFolder /mnt/ddev-global-cache/yarn/drupal-web
Error: ENOTDIR: not a directory, open '/dev/null/.config/yarn'
    at Object.openSync (node:fs:585:3)
    at readFileSync (node:fs:453:35)
    at /usr/lib/node_modules/yarn/lib/cli.js:97395:58
    at Array.map (<anonymous>)
    at parseRcPaths (/usr/lib/node_modules/yarn/lib/cli.js:97393:78)
    at Object.findRc (/usr/lib/node_modules/yarn/lib/cli.js:97407:10)
    at getRcConfigForCwd (/usr/lib/node_modules/yarn/lib/cli.js:56965:74)
    at /usr/lib/node_modules/yarn/lib/cli.js:88756:56
    at Generator.next (<anonymous>)
    at step (/usr/lib/node_modules/yarn/lib/cli.js:310:30)
+ true
+ npm config set cache /mnt/ddev-global-cache/npm/drupal-web
 
+ true
+ ln -sf /mnt/ddev-global-cache/nvm_dir/drupal-web /home/kubuntu/.nvm
ln: failed to create symbolic link '/home/kubuntu/.nvm': Permission denied

Actual Behavior

I guess it should start normally.

Steps To Reproduce

  1. Get a fresh Ubuntu 22.04 image, even Live USB is ok.
  2. Install docker and ddev there
  3. Create a Drupal project using Docker via commands like:
ddev config --docroot web --project-name drupal --project-type drupal9 --create-docroot
  1. Start the ddev:
ddev start
  1. See the error:
$ ddev start
Starting drupal... 
Unable to determine host.docker.internal - no gateway 
Network ddev-drupal_default  Created 
Container ddev-drupal-db  Started 
Container ddev-drupal-web  Started 
Container ddev-drupal-dba  Started 
Failed waiting for web/db containers to become ready: web container failed: log=phpstatus: FAILED /var/www/html: OK mailhog: FAILED , err=container /ddev-drupal-web unhealthy: phpstatus: FAILED /var/www/html: OK mailhog: FAILED  
Container ddev-router  Running 
Failed to start drupal: container(s) failed to become healthy before their configured timeout or in 120 seconds. This may be just a problem with the healthcheck and not a functional problem. (container 'web' exited, please use 'ddev logs -s web' to find out why it failed) 

Anything else?

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 19 (18 by maintainers)

Most upvoted comments

I’ve been able to recreate the /dev/null/yarn/.berry failure on WSL2 with buildkite-agent setup and username. Reopening and will try to solve this particular variant.

This bug is active for me now on fresh v1.21.3, also checked now on v1.21.2 - on there it exists too 😦 image