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:
1 parent
aef2e8a01b
commit
7ec926ddf7
2 files changed
+4
-2
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user