From: vsr Date: Thu, 24 Oct 2019 13:13:45 +0000 (+0300) Subject: #17872 [CEA] /tmp/.salome_PortManager.lock permission denied (attempt 3) X-Git-Tag: V9_4_0rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ccfa750dfab40791eed37d63efd9339e44a37a0e;p=modules%2Fkernel.git #17872 [CEA] /tmp/.salome_PortManager.lock permission denied (attempt 3) --- diff --git a/bin/PortManager.py b/bin/PortManager.py index 0b8dd94c1..a00d49304 100644 --- a/bin/PortManager.py +++ b/bin/PortManager.py @@ -82,7 +82,14 @@ def _getConfigurationFilename(): hidden=True) import tempfile temp = tempfile.NamedTemporaryFile() - lock_file = os.path.join(os.path.dirname(temp.name), ".salome_PortManager.lock") + lock_file = os.path.join(os.path.dirname(temp.name), ".salome", ".PortManager.lock") + try: + oldmask = os.umask(0) + os.makedirs(os.path.dirname(lock_file)) + except IOError: + pass + finally: + os.umask(oldmask) temp.close() return (portmanager_config, lock_file)