From 8a4f303b0c2150a933bd06e145862f489a4256f5 Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 27 Aug 2021 02:42:10 +1000 Subject: Log directory and it's contents only readable / writable for the opensim user. Coz they might have passwords in it. --- src/sledjchisl/sledjchisl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index c8b930c..6298760 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -8517,7 +8517,7 @@ Build the OpenSim. if ((! qfile_exist(scBackup)) && (! qfile_mkdir(scBackup, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scBackup); if ((! qfile_exist(scCache)) && (! qfile_mkdir(scCache, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scCache); if ((! qfile_exist(scData)) && (! qfile_mkdir(scData, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scData); - if ((! qfile_exist(scLog)) && (! qfile_mkdir(scLog, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scLog); + if ((! qfile_exist(scLog)) && (! qfile_mkdir(scLog, S_IRWXU, true))) C("Unable to create path %s", scLog); if ((! qfile_exist(scTemp)) && (! qfile_mkdir(scTemp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scTemp); tmp = xmprintf("%s/sessions", scCache); if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); @@ -8562,7 +8562,7 @@ Create the /opt/opensim-SC directory structure. if (shellMeFail("chmod g+s %s", scEtc)) C("Can't set proper permissions for %s", scEtc); if (shellMeFail("chmod a+x %s/*.shini", scEtc)) C("Can't set proper permissions for %s/*.shini", scEtc); if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scLib)) C("Can't set proper permissions for %s", scLib); - if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scLog)) C("Can't set proper permissions for %s", scLog); + if (shellMeFail("chmod -fR u=rw,u+X,go= %s", scLog)) C("Can't set proper permissions for %s", scLog); if (shellMeFail("chmod -fR a=r,ug=rw,a+X %s", scTemp)) C("Can't set proper permissions for %s", scTemp); // if (shellMeFail("chmod -R a+x %s/current/*.sh", scRoot)) C("Can't set proper permissions for %s/current/*.sh", scRoot); -- cgit v1.1