diff --git a/awx/main/utils/external_logging.py b/awx/main/utils/external_logging.py index ac9d2834c838..f551dad2c2a8 100644 --- a/awx/main/utils/external_logging.py +++ b/awx/main/utils/external_logging.py @@ -1,6 +1,6 @@ import os import shutil -import tempfile +import tempfile import urllib.parse as urlparse from django.conf import settings @@ -117,6 +117,7 @@ def reconfigure_rsyslog(): with tempfile.TemporaryDirectory(prefix='rsyslog-conf-') as temp_dir: path = temp_dir + '/rsyslog.conf.temp' with open(path, 'w') as f: + os.chmod(path, 0o640) f.write(tmpl + '\n') shutil.move(path, '/var/lib/awx/rsyslog/rsyslog.conf') supervisor_service_command(command='restart', service='awx-rsyslogd')