1
0
mirror of https://github.com/moepman/acertmgr.git synced 2024-11-14 18:35:27 +01:00

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 <ralf@ramses-pyramidenbau.de>
This commit is contained in:
Ralf Ramsauer 2016-04-10 02:45:29 +02:00 committed by Markus Hauschild
parent 6b7f1ebfe0
commit 62a6084905

View File

@ -15,6 +15,7 @@ import os
import pwd import pwd
import shutil import shutil
import subprocess import subprocess
import stat
import tempfile import tempfile
import yaml import yaml
@ -105,6 +106,7 @@ def cert_get(domains, settings):
if cert_isValid(crt_file, 60): if cert_isValid(crt_file, 60):
crt_final = os.path.join(ACME_DIR, ("%s.crt" % domain)) crt_final = os.path.join(ACME_DIR, ("%s.crt" % domain))
shutil.copy2(crt_file, crt_final) shutil.copy2(crt_file, crt_final)
os.chmod(crt_final, stat.S_IREAD)
finally: finally:
if settings['mode'] == 'standalone': if settings['mode'] == 'standalone':