From 65a869075012dfccec9f6be7908efecbcdf52cc0 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Sat, 20 Jun 2026 21:04:16 +0000 Subject: [PATCH] fix: use /bin/rm explicitly in removePool so sudoers path matches Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01LP9Q4kfCAYAjJnsbHBrViZ --- panel/lib/PHPManager.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/panel/lib/PHPManager.php b/panel/lib/PHPManager.php index 8dea225..824c8b4 100644 --- a/panel/lib/PHPManager.php +++ b/panel/lib/PHPManager.php @@ -48,9 +48,7 @@ php_value[max_execution_time] = 30 public static function removePool(string $username): void { foreach (['7.4','8.1','8.2','8.3'] as $ver) { $file = str_replace('{ver}', $ver, self::$poolDir) . "/{$username}.conf"; - // Always attempt removal — don't rely on file_exists() which fails when - // www-data can't read the pool.d directory; rm -f is a no-op if missing - shell_exec("sudo rm -f " . escapeshellarg($file) . " 2>/dev/null"); + shell_exec("sudo /bin/rm -f " . escapeshellarg($file) . " 2>/dev/null"); self::reloadFPM($ver); } }