fix(node): make environment progress readable from the desktop
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user