mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 22:14:53 +00:00
chore: prepare for PR
This commit is contained in:
1 parent
78aea9a7ec
commit
2b7e2ebafb
3 files changed
+11
-2
No files matched your search
@@ -237,7 +237,7 @@ class PrivateKey extends BaseModel
|
|||||||
$testSuccess = $disk->put($testFilename, 'test');
|
$testSuccess = $disk->put($testFilename, 'test');
|
||||||
|
|
||||||
if (! $testSuccess) {
|
if (! $testSuccess) {
|
||||||
throw new \Exception('SSH keys storage directory is not writable');
|
throw new \Exception('SSH keys storage directory is not writable. Run on the host: sudo chown -R 9999 /data/coolify/ssh && sudo chmod -R 700 /data/coolify/ssh && docker restart coolify');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean up test file
|
// Clean up test file
|
||||||
|
|||||||
@@ -141,6 +141,15 @@ else
|
|||||||
log "Network 'coolify' already exists"
|
log "Network 'coolify' already exists"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fix SSH directory ownership if not owned by container user UID 9999 (fixes #6621)
|
||||||
|
# Only changes owner — preserves existing group to respect custom setups
|
||||||
|
SSH_OWNER=$(stat -c '%u' /data/coolify/ssh 2>/dev/null || echo "unknown")
|
||||||
|
if [ "$SSH_OWNER" != "9999" ]; then
|
||||||
|
log "Fixing SSH directory ownership (was owned by UID $SSH_OWNER)"
|
||||||
|
chown -R 9999 /data/coolify/ssh
|
||||||
|
chmod -R 700 /data/coolify/ssh
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if Docker config file exists
|
# Check if Docker config file exists
|
||||||
DOCKER_CONFIG_MOUNT=""
|
DOCKER_CONFIG_MOUNT=""
|
||||||
if [ -f /root/.docker/config.json ]; then
|
if [ -f /root/.docker/config.json ]; then
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->expectException(\Exception::class);
|
$this->expectException(\Exception::class);
|
||||||
$this->expectExceptionMessage('SSH keys storage directory is not writable');
|
$this->expectExceptionMessage('SSH keys storage directory is not writable. Run on the host: sudo chown -R 9999 /data/coolify/ssh && sudo chmod -R 700 /data/coolify/ssh && docker restart coolify');
|
||||||
|
|
||||||
PrivateKey::createAndStore([
|
PrivateKey::createAndStore([
|
||||||
'name' => 'Test Key',
|
'name' => 'Test Key',
|
||||||
|
|||||||
Reference in new issue
Block a user