fix(gitea): Fix /data directory permissions for git user

- chown -R git:git /data at startup to fix permission issues
- chmod 755 on key directories
- Add /data/log directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-01-24 11:09:15 +01:00
parent 5590bf375b
commit 944a0f8418

View File

@ -248,11 +248,12 @@ fi
# Ensure git user exists
id -u git >/dev/null 2>&1 || adduser -D -s /bin/bash -h /data git
# Ensure directories exist and have correct ownership
# Ensure directories exist with correct ownership
mkdir -p /data/git/repositories
mkdir -p /data/custom/conf
chown -R git:git /data/git 2>/dev/null || true
chown -R git:git /data/custom 2>/dev/null || true
mkdir -p /data/log
chown -R git:git /data
chmod 755 /data /data/git /data/custom /data/custom/conf
# Generate SSH host keys if needed
if [ ! -f /data/ssh/ssh_host_rsa_key ]; then