From 8548ba9a08afc2a61b55a1df3923e50e2df03b88 Mon Sep 17 00:00:00 2001 From: ajmallesh Date: Tue, 20 Jan 2026 10:01:21 -0800 Subject: [PATCH] fix: set write permissions on audit-logs and output directories for container user The container runs as non-root user 'pentest' (UID 1001), but bind-mounted directories are owned by the host user. Added chmod 777 after mkdir to ensure the container can write to these directories. --- shannon | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shannon b/shannon index 61f8a4e..18abad6 100755 --- a/shannon +++ b/shannon @@ -144,11 +144,16 @@ cmd_start() { # Handle custom OUTPUT directory # Export OUTPUT_DIR for docker-compose volume mount BEFORE starting containers if [ -n "$OUTPUT" ]; then - # Create output directory if it doesn't exist + # Create output directory with write permissions for container user (UID 1001) mkdir -p "$OUTPUT" + chmod 777 "$OUTPUT" export OUTPUT_DIR="$OUTPUT" fi + # Ensure audit-logs directory exists with write permissions for container user (UID 1001) + mkdir -p ./audit-logs + chmod 777 ./audit-logs + # Ensure containers are running (starts them if needed) ensure_containers