You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/11/23 07:40:00 UTC

[incubator-datalab] 01/02: [DATALAB-2616]: changed how log dir is created and changed its modes of access

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2616
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 8ac89742c25b2050c487b2b7764aa0373a303717
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Tue Nov 23 09:33:26 2021 +0200

    [DATALAB-2616]: changed how log dir is created and changed its modes of access
---
 infrastructure-provisioning/src/general/lib/os/logger.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/logger.py b/infrastructure-provisioning/src/general/lib/os/logger.py
index 195dafc..de8750d 100644
--- a/infrastructure-provisioning/src/general/lib/os/logger.py
+++ b/infrastructure-provisioning/src/general/lib/os/logger.py
@@ -33,7 +33,7 @@ try:
 except:
     os.environ['conf_resource'] = 'undefined_conf_resource'
 
-subprocess.run("sudo mkdir -p /logs/{}/".format(os.environ['conf_resource']), shell=True)
+subprocess.run('/bin/bash -c -l "sudo mkdir -p /logs/{0}/"; sudo chmod a+rwx /logs/{0}'.format(os.environ['conf_resource']), shell=True)
 
 local_log_filename = "{}_{}.log".format(os.environ['conf_resource'], os.environ['request_id'])
 local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org