From 62a60849052fddb5a84c82ea57281ca594598897 Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Sun, 10 Apr 2016 02:45:29 +0200 Subject: [PATCH] Adjust permissions of certificates For the internal store of certificates in the configuration directory, a permission of user read only is absolutely sufficient Signed-off-by: Ralf Ramsauer --- acertmgr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/acertmgr.py b/acertmgr.py index 7d64155..8582cbe 100755 --- a/acertmgr.py +++ b/acertmgr.py @@ -15,6 +15,7 @@ import os import pwd import shutil import subprocess +import stat import tempfile import yaml @@ -105,6 +106,7 @@ def cert_get(domains, settings): if cert_isValid(crt_file, 60): crt_final = os.path.join(ACME_DIR, ("%s.crt" % domain)) shutil.copy2(crt_file, crt_final) + os.chmod(crt_final, stat.S_IREAD) finally: if settings['mode'] == 'standalone':