Fix /etc/micronas dir permissions: 750 root:www-data so Apache can traverse

700 blocked www-data from entering the dir even though the passwd file
had correct group permissions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
marcandClaude Sonnet 4.6 committed 2026-06-20 16:54:25 +02:00
1 parent aef2e8a01b
commit 7ec926ddf7
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -48,7 +48,8 @@ python3 -m venv /opt/micronas/venv
```bash
mkdir -p /etc/micronas
chmod 700 /etc/micronas
chmod 750 /etc/micronas
chown root:www-data /etc/micronas
```
Credentials are set on first login via the `/setup` page in the browser. No manual env file editing needed.
+2 -1
View File
@@ -49,7 +49,8 @@ def _verify_password(password):
def _save_credentials(user, password):
h = _hash_password(password)
os.makedirs(_CONF_DIR, exist_ok=True)
os.makedirs(_CONF_DIR, mode=0o750, exist_ok=True)
subprocess.run(['chown', 'root:www-data', _CONF_DIR], capture_output=True)
Path(_ENV_FILE).write_text(f'MICRONAS_USER={user}\nMICRONAS_PASS_HASH={h}\n')
os.chmod(_ENV_FILE, 0o600)
_creds['user'] = user