mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 10:05:47 -05:00
fix: use --user root for docker exec when applying volume ownership
Ensures chown/chmod commands run as root inside containers even when the container runs as a non-root user by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
aa4c6f1dc7
commit
253dcab3a5
@@ -3322,14 +3322,14 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");
|
||||
if ($storage->chown) {
|
||||
$escapedChown = escapeshellarg($storage->chown);
|
||||
$this->execute_remote_command(
|
||||
["docker exec {$containerName} chown {$recursiveFlag}{$escapedChown} {$mountPath}", 'hidden' => true],
|
||||
["docker exec --user root {$containerName} chown {$recursiveFlag}{$escapedChown} {$mountPath}", 'hidden' => true],
|
||||
);
|
||||
}
|
||||
|
||||
if ($storage->chmod) {
|
||||
$escapedChmod = escapeshellarg($storage->chmod);
|
||||
$this->execute_remote_command(
|
||||
["docker exec {$containerName} chmod {$recursiveFlag}{$escapedChmod} {$mountPath}", 'hidden' => true],
|
||||
["docker exec --user root {$containerName} chmod {$recursiveFlag}{$escapedChmod} {$mountPath}", 'hidden' => true],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user