From 5a1ab414f10dd80e84ed3ace5be84e348c0ebe2e Mon Sep 17 00:00:00 2001 From: root Date: Fri, 19 Dec 2025 07:50:02 +0000 Subject: [PATCH] Allow devuser (UID 1000) to run framework in autonomous Claude mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- bootstrap/app.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index ae168af14..d134837b0 100755 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -60,9 +60,11 @@ if (str_contains($base_path, ' ')) { if ($app_env !== 'production' && $app_env !== 'prod') { // Check if we're not in the expected Docker environment - // Check if running as root + // Allow root OR devuser (UID 1000) when /docker exists (autonomous Claude mode) /** @phpstan-ignore-next-line */ - $is_docker = ($base_path === '/var/www/html' || $base_path === '/var/www/html/system') && (posix_getuid() === 0 || posix_geteuid() === 0); + $is_root = posix_getuid() === 0 || posix_geteuid() === 0; + $is_devuser = posix_getuid() === 1000 && trim(shell_exec('whoami') ?? '') === 'devuser' && is_dir('/docker'); + $is_docker = ($base_path === '/var/www/html' || $base_path === '/var/www/html/system') && ($is_root || $is_devuser); if (!$is_docker) { // Determine if this is a CLI or web request