]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Modify access permissions for log files MTAJ_br1
authortajchman <tajchman>
Tue, 3 Feb 2004 13:16:27 +0000 (13:16 +0000)
committertajchman <tajchman>
Tue, 3 Feb 2004 13:16:27 +0000 (13:16 +0000)
bin/orbmodule.py
bin/runNS.sh
bin/runSalome.py

index 1154b010115ea053049afe9ecd91bb3fae8d94eb..b8ea6915fa6dc19081d9b72cf500965a57f95159 100755 (executable)
@@ -25,7 +25,7 @@ class NamingServer(Server):
    if USER is None:
       USER='anonymous'
    LOGDIR="/tmp/logs/" + USER
-   os.system("mkdir -m 777 -p " + LOGDIR)
+   os.system("mkdir -m 755 -p " + LOGDIR)
    CMD="runNS.sh > " + LOGDIR + "/salomeNS.log 2>&1"
 
 # -----------------------------------------------------------------------------
index 226bc9be63b64c5fc9e9e4cd34fac4b412e4b72a..c9c8cfef880a44168999f91711ee7707d9429889 100755 (executable)
@@ -11,8 +11,7 @@ Username=`/usr/bin/whoami`
 
 # clear log files
 
-mkdir -m 775 ${BaseDir}/logs 
-mkdir ${BaseDir}/logs/${Username}
+mkdir -p ${BaseDir}/logs/${Username}
 touch ${BaseDir}/logs/${Username}/dummy
 \rm -f ${BaseDir}/logs/${Username}/omninames* ${BaseDir}/logs/${Username}/dummy ${BaseDir}/logs/${Username}/*.log
 
index ccbbb6fdf8dce76e171ebf83c295bc7e8efaec1e..bcfa10340f6b8e017ad3ae4f575545d511281293 100755 (executable)
@@ -153,6 +153,13 @@ liste_modules[:0]=["KERNEL"]
 os.environ["SALOMEPATH"]=":".join(modules_root_dir.values())
 if "SUPERV" in liste_modules:with_container_superv=1
 
+os.system("mkdir -m 777 -p /tmp/logs")
+if os.access('/tmp/logs', os.W_OK) == 0:
+    print """
+Cannot put log files in /tmp/logs.
+Check existence and write permission of /tmp/logs directory
+"""
+    sys.exit(1)
 
 # -----------------------------------------------------------------------------
 #