From 8d023147ccd1485279570288494f80221f1e8321 Mon Sep 17 00:00:00 2001 From: anti Date: Thu, 9 Apr 2026 19:36:53 -0400 Subject: [PATCH] fix: chmod 777 log dir on compose generation so container decnet user can write logs --- decnet/composer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/decnet/composer.py b/decnet/composer.py index 6e12dca..e07b7f5 100644 --- a/decnet/composer.py +++ b/decnet/composer.py @@ -43,8 +43,11 @@ def generate_compose(config: DecnetConfig) -> dict: log_container_path: str | None = None if config.log_file: log_host_dir, log_container_path = _resolve_log_file(config.log_file) - # Ensure the host log directory exists so Docker doesn't create it as root-owned - Path(log_host_dir).mkdir(parents=True, exist_ok=True) + # Ensure the host log directory exists and is writable by the container's + # non-root 'decnet' user (DEBT-019). mkdir respects umask, so chmod explicitly. + _log_dir = Path(log_host_dir) + _log_dir.mkdir(parents=True, exist_ok=True) + _log_dir.chmod(0o777) for decky in config.deckies: base_key = decky.name # e.g. "decky-01"