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
1 changed files with 2 additions and 0 deletions

View File

@ -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':