fix: pre-create xdebug.log with world-writable permissions by AaronFeledy · Pull Request #242 · lando/php

@AaronFeledy

When xdebug is enabled, the log file at /tmp/xdebug.log can be created
as root during build_as_root or run_as_root steps. Subsequent runs as
www-data then fail because the file is owned by root.

Pre-create the log file with 666 permissions during the same
build_as_root_internal step that enables xdebug, ensuring any user
can write to it regardless of which user triggers the first write.

added 2 commits

March 5, 2026 15:34
Move the touch/chmod of /tmp/xdebug.log outside the xdebug conditional
so it runs for all PHP services regardless of xdebug config. This is
defensive — ensures the file is always writable even if xdebug gets
enabled later or something else writes to that path.

cursor[bot]

This was referenced

Mar 8, 2026