ddev: Error when using upload-dirs=cpresources flag with 'ddev composer create' (with mutagen enabled)

Is there an existing issue for this?

  • I have searched the existing issues

Output of ddev debug test

Expand `ddev debug test` diagnostic information
ddev debug test
Running bash [-c /var/folders/n8/0fzdvc910h3_z38zq4gnp7480000gn/T/test_ddev.sh]
======= Existing project config =========
These config files were loaded for project <project_name>: [/Users/<user>/Sites/<project_name>/www/.ddev/config.yaml /Users/<user>/Sites/<project_name>/www/.ddev/config.arm64.yaml]
name: <project_name>
type: craftcms
docroot: web
php_version: 8.1
webserver_type: apache-fpm
webimage: drud/ddev-webserver:v1.21.5
router_http_port: 80
router_https_port: 443
database: {mysql 8.0}
upload_dir: public
mailhog_port: 8025
mailhog_https_port: 8026
phpmyadmin_port: 8036
phpmyadmin_https_port: 8037
webimage_extra_packages: [chromium]
project_tld: ddev.site
use_dns_when_possible: true
timezone: Europe/Brussels
composer_version: 2
nodejs_version: 16
default_container_timeout: 120
======= Creating dummy project named  tryddevproject-1154 in ../tryddevproject-1154 =========
OS Information: Darwin MBP-van-<user>.telenet.be 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64
ProductName:		macOS
ProductVersion:		13.4.1
BuildVersion:		22F82
User information: uid=501(<user>) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),703(com.apple.sharepoint.group.3),702(com.apple.sharepoint.group.2),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae)
DDEV version:  ITEM             VALUE
 DDEV version     v1.21.6
 architecture     arm64
 db               drud/ddev-dbserver-mariadb-10.4:v1.21.5
 dba              phpmyadmin:5
 ddev-ssh-agent   drud/ddev-ssh-agent:v1.21.5
 docker           24.0.2
 docker-compose   v2.15.1
 docker-platform  docker
 mutagen          0.16.0
 os               darwin
 router           drud/ddev-router:v1.21.5
 web              drud/ddev-webserver:v1.21.5
PROXY settings: HTTP_PROXY='' HTTPS_PROXY='' http_proxy='' NO_PROXY=''
======= DDEV global info =========
Global configuration:
instrumentation-opt-in=true
omit-containers=[]
mutagen-enabled=true
nfs-mount-enabled=false
router-bind-all-interfaces=false
internet-detection-timeout-ms=3000
disable-http2=false
use-letsencrypt=false
letsencrypt-email=
table-style=default
simple-formatting=false
auto-restart-containers=false
use-hardened-images=false
fail-on-hook-fail=false
required-docker-compose-version=
use-docker-compose-from-path=false
project-tld=
xdebug-ide-location=
no-bind-mounts=false
use-traefik=false
wsl2-no-windows-hosts-mgt=false

======= DOCKER info =========
docker location: lrwxr-xr-x@ 1 <user>  staff  53 14 jun 07:18 /Users/<user>/.orbstack/bin/docker -> /Applications/OrbStack.app/Contents/MacOS/xbin/docker
Docker Desktop Version: Print: Entry, ":CFBundleShortVersionString", Does Not Exist
Print: Entry, ":CFBundleVersion", Does Not Exist
Docker Desktop for Mac File build Doesn'tDocker Desktop for Mac Exist, build WillDocker Desktop for Mac Create: build /Applications/Docker.app/Contents/Info.plistDocker Desktop for Mac File build Doesn'tDocker Desktop for Mac Exist, build WillDocker Desktop for Mac Create: build /Applications/Docker.app/Contents/Info.plist
docker version:
Client:
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:51:16 2023
 OS/Arch:           darwin/arm64
 Context:           default

Server:
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       659604f9ee60f147020bdd444b26e4b5c636dc28
  Built:            Sat May 27 17:14:34 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.7.2
  GitCommit:        0cae528dd6cb557f7201036e9f43420650207b58
 runc:
  Version:          1.1.7
  GitCommit:        860f061b76bb4fc671f0f9e900f7d80ff93d4eb7
 docker-init:
  Version:          0.19.0
  GitCommit:
DOCKER_DEFAULT_PLATFORM=notset
======= Mutagen Info =========
Mutagen is installed in ddev, version=0.16.0
--------------------------------------------------------------------------------
Name: <project_name>
Identifier: sync_cxjbKBouzb7HtUSd4APFy3ti5E7v1PLC2GZOhTvAQag
Labels:
	com.ddev.volume-signature: Users-<user>-orbstack-run-1687877890
Configuration:
	Synchronization mode: Two Way Resolved
	Maximum allowed entry count: Default (2⁶⁴−1)
	Maximum staging file size: Default (18 EB)
	Symbolic link mode: POSIX Raw
	Ignore VCS mode: Default (Propagate)
	Ignores:
		/.git
		/.tarballs
		/.ddev/db_snapshots
		/.ddev/.importdb*
		.DS_Store
		.idea
		/web/public
	Permissions mode: Default (Portable)
Alpha:
	URL: /Users/<user>/Sites/<project_name>/www
	Configuration:
		Watch mode: Default (Portable)
		Watch polling interval: Default (10 seconds)
		Probe mode: Default (Probe)
		Scan mode: Default (Accelerated)
		Stage mode: Neighboring
		File mode: Default (0600)
		Directory mode: Default (0700)
		Default file/directory owner: Default
		Default file/directory group: Default
	Connected: No
Beta:
	URL: docker://ddev-<project_name>-web/var/www/html
		DOCKER_HOST=unix:///Users/<user>/.orbstack/run/docker.sock
	Configuration:
		Watch mode: Default (Portable)
		Watch polling interval: Default (10 seconds)
		Probe mode: Default (Probe)
		Scan mode: Default (Accelerated)
		Stage mode: Neighboring
		File mode: Default (0600)
		Directory mode: Default (0700)
		Default file/directory owner: Default
		Default file/directory group: Default
	Connected: No
Status: [Paused]
--------------------------------------------------------------------------------
======= Docker Info =========
Docker platform: docker
Using docker context: default (unix:///Users/<user>/.orbstack/run/docker.sock)
docker-compose: v2.15.1
Using DOCKER_HOST=unix:///Users/<user>/.orbstack/run/docker.sock
Docker version: 24.0.2
Able to run simple container that mounts a volume.
Able to use internet inside container.
Docker disk space:
Filesystem                Size      Used Available Use% Mounted on
overlay                 118.5G     26.4G     92.2G  22% /

Stopped mutagen daemon
The ddev-ssh-agent container has been removed. When you start it again you will have to use 'ddev auth ssh' to provide key authentication again.
Existing docker containers:
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
Creating a new ddev project config in the current directory (/Users/<user>/Sites/<project_name>/tryddevproject-1154)
Once completed, your configuration will be written to /Users/<user>/Sites/<project_name>/tryddevproject-1154/.ddev/config.yaml

Configuring unrecognized codebase as project type 'php' at /Users/<user>/Sites/<project_name>/tryddevproject-1154/web
Configuration complete. You may now run 'ddev start'.
Network ddev_default created
Starting tryddevproject-1154...
Container ddev-ssh-agent  Started
ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys.
Network ddev-tryddevproject-1154_default  Created
Container ddev-tryddevproject-1154-web  Started
Container ddev-tryddevproject-1154-dba  Started
Container ddev-tryddevproject-1154-db  Started
You have mutagen enabled and your 'php' project type doesn't have an upload_dir set.
For faster startup and less disk usage,
set upload_dir to where your user-generated files are stored.
Starting mutagen sync process... This can take some time.
Mutagen sync flush completed in 1s.
For details on sync status 'ddev mutagen st tryddevproject-1154 -l'
Container ddev-router  Started
Successfully started tryddevproject-1154
Project can be reached at https://tryddevproject-1154.ddev.site https://127.0.0.1:32935
======== Curl of site from inside container:
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 27 Jun 2023 15:38:01 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding

======== curl -I of http://tryddevproject-1154.ddev.site from outside:
HTTP/1.1 200 OK
Server: nginx/1.20.1
Date: Tue, 27 Jun 2023 15:38:01 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding

======== full curl of http://tryddevproject-1154.ddev.site from outside:
Success accessing database... db via TCP/IP
ddev is working. You will want to delete this project with 'ddev delete -Oy tryddevproject-1154'
======== Project ownership on host:
drwxr-xr-x  4 <user>  staff  128 27 jun 17:37 ../tryddevproject-1154
======== Project ownership in container:
drwxr-xr-x 1 <user> dialout 16 Jun 27 15:37 /var/www/html
======== In-container filesystem:
Filesystem     Type  1K-blocks     Used Available Use% Mounted on
/dev/vdb1      btrfs 124284420 27851868  96452440  23% /var/www
======== curl again of tryddevproject-1154 from host:
Success accessing database... db via TCP/IP
ddev is working. You will want to delete this project with 'ddev delete -Oy tryddevproject-1154'
Thanks for running the diagnostic. It was successful.
Please provide the output of this script in a new gist at gist.github.com
Running ddev launch in 5 seconds
If you're brave and you have jq you can delete all tryddevproject instances with this one-liner:
    ddev delete -Oy $(ddev list -j |jq -r .raw[].name | grep tryddevproject)
In the future ddev debug test will also provide this option.

Please delete this project after debugging with 'ddev delete -Oy tryddevproject-1154'

Expected Behavior

Successful creation of the project with the specified upload directory.

Actual Behavior

Error occurs during the project creation process when the upload-dir flag is set to 'public'. The following error message is displayed
rsync: [receiver] mkstemp "/var/www/html/web/public/.gitignore.IYVNFK" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
Failed to create project: ComposeCmd failed to run 'COMPOSE_PROJECT_NAME=ddev-<project_name> docker-compose -f /<generic_user>/Sites/<project_name>/www/.ddev/.ddev-docker-compose-full.yaml exec -w /var/www/html -T web bash -c set -eu && ( rsync -rltgopD "/tmp/TQYtMb/" "/var/www/html/")', action='[exec -w /var/www/html -T web bash -c set -eu && ( rsync -rltgopD "/tmp/TQYtMb/" "/var/www/html/")]', err='exit status 23', stdout='', stderr='rsync: [receiver] mkstemp "/var/www/html/web/public/.gitignore.IYVNFK" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]'

Steps To Reproduce

  1. Execute the following command to configure DDEV: ddev config --project-name=<project_name> --project-type=craftcms --docroot=web --create-docroot --upload-dir=public
  2. Run the ddev composer create -y --no-install --no-scripts <package> command.
  3. Observe the error message mentioned above during the project creation process.

Anything else?

It is important to note that the issue described above only occurs when using the upload-dir flag. Without the upload-dir flag, the project creation process works correctly.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I have retested the PR, and apart from the fact that I now need to use upload_dirs (presumably due to another update), I can confirm that the issue is resolved. Thanks!

Thanks for the feedback @bavodeclercq . I’ve pushed another commit which solves the issue for me. Please give it another try, thanks!

I’ve asked a colleague who has Colima installed to test the PR, and he encountered the same problem.

$ ddev -v
ddev version v1.22.0-alpha3-20-g4f6c436d

Projects/test
$ ddev config --project-type=craftcms --docroot=web --create-docroot --upload-dir=cpresources                                                                                          <user>, 8:50:12
Creating a new ddev project config in the current directory (/Projects/test)
Once completed, your configuration will be written to /Projects/test/.ddev/config.yaml

Created docroot at /Projects/test/web
You have specified a project type of craftcms but no project of that type is found in /Projects/test/web
Configuration complete. You may now run 'ddev start'.

Projects/test
$ ddev composer create -y --no-scripts craftcms/craft                                                                                                                                  <user>, 8:50:21
Downloading https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-darwin-x86_64 ...
docker-compose 52.27 MiB / 52.27 MiB [============================================================================================================================================================] 100.00% 6s
Download complete.
20230509_gitpod_output: Pulling from ddev/ddev-webserver
ce6d4037a3c8: Pull complete
Digest: sha256:41439780766bf0c9b5c03fe961ebf8c3cae8bb0bee032bec82c0b639816cf3d6
Status: Downloaded newer image for ddev/ddev-webserver:20230509_gitpod_output
docker.io/ddev/ddev-webserver:20230509_gitpod_output
20230415_move_docker_to_ddev: Pulling from ddev/ddev-ssh-agent
26c5c85e47da: Pull complete
6ba1480f4618: Pull complete
ec23202b9800: Pull complete
4f4fb700ef54: Pull complete
635bed6f0611: Pull complete
f8b623f0fc8f: Pull complete
Digest: sha256:1f792258db3e915e1ac2b567c14386e7738e339125093218f8fe5d959f1fc9c5
Status: Downloaded newer image for ddev/ddev-ssh-agent:20230415_move_docker_to_ddev
docker.io/ddev/ddev-ssh-agent:20230415_move_docker_to_ddev
v2.10: Pulling from library/traefik
31e352740f53: Pull complete
4b9a9b499d7a: Pull complete
d581263ee7dc: Pull complete
f5f0f39a1a90: Pull complete
Digest: sha256:c272e8c32fb7356c2166bc5d170ab0a2c73da7bfec561234c52f255ece1dd07c
Status: Downloaded newer image for traefik:v2.10
docker.io/library/traefik:v2.10
Stopped mutagen daemon
Downloading https://github.com/mutagen-io/mutagen/releases/download/v0.17.1/mutagen_darwin_amd64_v0.17.1.tar.gz ...
mutagen.tgz 91.92 MiB / 91.92 MiB [==============================================================================================================================================================] 100.00% 49s
Download complete.
Stopped mutagen daemon
 Container ddev-ssh-agent  Recreate
 Container ddev-ssh-agent  Recreated
 Container ddev-ssh-agent  Started
ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys.
20230519_fix_mysql_snapshot_restore: Pulling from ddev/ddev-dbserver-mysql-8.0
2c8188a637bf: Pull complete
4f4fb700ef54: Pull complete
9dba972ded6d: Pull complete
f57d0782865d: Pull complete
6af71d561adf: Pull complete
a5a43fe7a813: Pull complete
b84114c2259b: Pull complete
a1171cd4745f: Pull complete
2c6e0714d1bf: Pull complete
01e500cbe418: Pull complete
3427d8e953f3: Pull complete
91937bd24738: Pull complete
ccf7d9d6fe15: Pull complete
45dbb36b7b1a: Pull complete
4f47b00d990e: Pull complete
c6d0d10546e2: Pull complete
Digest: sha256:5bd16f3f9f8179fe9010e82185d36e1c3647e006f8aa136e5b8ec4efc1c631d1
Status: Downloaded newer image for ddev/ddev-dbserver-mysql-8.0:20230519_fix_mysql_snapshot_restore
docker.io/ddev/ddev-dbserver-mysql-8.0:20230519_fix_mysql_snapshot_restore
 Network ddev-whatever_default  Created
 Container ddev-whatever-db  Created
 Container ddev-whatever-web  Created
 Container ddev-whatever-db  Started
 Container ddev-whatever-web  Started
Starting mutagen sync process... This can take some time.
Mutagen sync flush completed in 4s.
For details on sync status 'ddev mutagen st whatever -l'
 ddev-router Pulling
 Container ddev-router  Created
 Container ddev-router  Started
Warning: MOST EXISTING CONTENT in the composer root (/Projects/test) will be deleted by the composer create-project operation. Only .ddev, .git and .tarballs will be preserved.
Removing any existing files in composer root
Executing composer command: [composer create-project --no-scripts craftcms/craft --no-install /tmp/GVfUUH]

Creating a "craftcms/craft" project at "/tmp/GVfUUH"
Info from https://repo.packagist.org: #StandWithUkraine
Installing craftcms/craft (2.0.10)
  - Downloading craftcms/craft (2.0.10)
  - Installing craftcms/craft (2.0.10): Extracting archive
Created project in /tmp/GVfUUH
Moving install to composer root
rsync: [generator] failed to set times on "/var/www/html/web/cpresources": Read-only file system (30)
rsync: [receiver] mkstemp "/var/www/html/web/cpresources/.gitignore.Q2KqXx" failed: Read-only file system (30)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
Failed to create project: ComposeCmd failed to run 'COMPOSE_PROJECT_NAME=ddev-whatever docker-compose -f /Projects/test/.ddev/.ddev-docker-compose-full.yaml exec -w /var/www/html -T web bash -c set -eu && ( rsync -rltgopD "/tmp/GVfUUH/" "/var/www/html/")', action='[exec -w /var/www/html -T web bash -c set -eu && ( rsync -rltgopD "/tmp/GVfUUH/" "/var/www/html/")]', err='exit status 23', stdout='', stderr='rsync: [generator] failed to set times on "/var/www/html/web/cpresources": Read-only file system (30)
rsync: [receiver] mkstemp "/var/www/html/web/cpresources/.gitignore.Q2KqXx" failed: Read-only file system (30)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]'