From c9f510d7f406fcd25739795354a897e95b3673f1 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Wed, 17 Nov 2010 00:50:26 +0000 Subject: call conf.save() regardless of self-hosted or not always chown() the *.csv files, even if they already exist svn path=/portal-gui/scripts/adduser.py; revision=3552 --- portal-gui/scripts/adduser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'portal-gui/scripts/adduser.py') diff --git a/portal-gui/scripts/adduser.py b/portal-gui/scripts/adduser.py index bd0596a7..255c8455 100755 --- a/portal-gui/scripts/adduser.py +++ b/portal-gui/scripts/adduser.py @@ -85,9 +85,9 @@ if __name__ == '__main__': sys.exit(1) conf.host = host_set[0] - conf.save() else: print >>sys.stderr, '%s is self-hosted' % username + conf.save() myrpki_dir = '%s/%s' % (settings.MYRPKI_DATA_DIR, username) print 'myrpki_dir=', myrpki_dir @@ -115,7 +115,8 @@ prefix_csv=%(path)s/prefixes.csv""" % { 'path': myrpki_dir } print 'creating ', fname with open(fname, 'w') as f: # just create an empty file - os.fchown(f, apache_uid, -1) + pass + os.chown(fname, apache_uid, -1) # add a password for this user to the apache passwd file if not present -- cgit v1.2.3