From: tajchman Date: Tue, 3 Feb 2004 13:16:27 +0000 (+0000) Subject: Modify access permissions for log files X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FMTAJ_br1;p=modules%2Fkernel.git Modify access permissions for log files --- diff --git a/bin/orbmodule.py b/bin/orbmodule.py index 1154b0101..b8ea6915f 100755 --- a/bin/orbmodule.py +++ b/bin/orbmodule.py @@ -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" # ----------------------------------------------------------------------------- diff --git a/bin/runNS.sh b/bin/runNS.sh index 226bc9be6..c9c8cfef8 100755 --- a/bin/runNS.sh +++ b/bin/runNS.sh @@ -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 diff --git a/bin/runSalome.py b/bin/runSalome.py index ccbbb6fdf..bcfa10340 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -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) # ----------------------------------------------------------------------------- #