From aba5d0363296c3f230b3ecab9754f06cf49f1b20 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 13 Jul 2020 21:08:47 -0400 Subject: [PATCH] Set correct ownership on HOSTNAME file --- contrib/dokku-installer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/dokku-installer.py b/contrib/dokku-installer.py index 40b4dd378..b09e961d5 100755 --- a/contrib/dokku-installer.py +++ b/contrib/dokku-installer.py @@ -162,9 +162,13 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): except OSError: pass - with open('{0}/HOSTNAME'.format(dokku_root), 'w') as f: + hostname_filename = '{0}/HOSTNAME'.format(dokku_root) + + with open(hostname_filename, 'w') as f: f.write(params['hostname'].value) + shutil.chown(hostname_filename, dokku_user, dokku_group) + for (index, key) in enumerate(params['keys'].value.splitlines(), 1): user = 'admin' if self.admin_user_exists() is not None: