mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: change dir permissions.
This commit is contained in:
parent
e27d39c1ac
commit
49e52aa53c
|
|
@ -48,8 +48,11 @@ class ToolExecutor:
|
|||
return
|
||||
maxkb_logger.debug("init dir")
|
||||
if self.sandbox:
|
||||
os.chmod("/dev/shm", 0o707)
|
||||
os.chmod("/dev/mqueue", 0o707)
|
||||
try:
|
||||
os.system("chmod -R g-rwx /dev/shm /dev/mqueue")
|
||||
os.system("chmod o-rwx /run/postgresql")
|
||||
except:
|
||||
pass
|
||||
if CONFIG.get("SANDBOX_TMP_DIR_ENABLED", '0') == "1":
|
||||
tmp_dir_path = os.path.join(self.sandbox_path, 'tmp')
|
||||
os.makedirs(tmp_dir_path, 0o700, exist_ok=True)
|
||||
|
|
|
|||
Loading…
Reference in New Issue