fix(node): make environment progress readable from the desktop

This commit is contained in:
DCCONSTRUCTIONS
2026-09-05 19:54:08 +03:00
parent 59e14c5bc0
commit 9062126913
6 changed files with 43 additions and 4 deletions
@@ -38,10 +38,16 @@ def command(argv, *, timeout=15):
def trusted_directory(path, mode=0o755):
created = not path.exists() and not path.is_symlink()
path.mkdir(mode=mode, parents=True, exist_ok=True)
info = path.lstat()
if not stat.S_ISDIR(info.st_mode) or info.st_uid != 0 or info.st_mode & 0o022:
raise SetupError("Каталог настройки имеет неподходящие права. Переустановите пакет Node через интерфейс системы.")
# umask 0077 must protect working files, but this nonsensitive report and
# newly created configuration directories must be traversable by readers.
# The only existing directory repaired here is our dedicated report store.
if created or path == STATE:
path.chmod(mode)
def publish(path, data):