if config:
with open(data_dir + '/config', 'w') as f:
- f.write(config)
os.fchown(f.fileno(), uid, gid)
+ os.fchmod(f.fileno(), 0o600)
+ f.write(config)
if keyring:
with open(data_dir + '/keyring', 'w') as f:
- f.write(keyring)
os.fchmod(f.fileno(), 0o600)
os.fchown(f.fileno(), uid, gid)
+ f.write(keyring)
def get_config_and_keyring():
if args.config_and_keyring:
# write conf
with open(mon_dir + '/config', 'w') as f:
+ os.fchown(f.fileno(), uid, gid)
+ os.fchmod(f.fileno(), 0o600)
f.write(config)
else:
# dirs, conf, keyring
).run()
with open(mon_dir + '/config', 'w') as f:
+ os.fchown(f.fileno(), uid, gid)
+ os.fchmod(f.fileno(), 0o600)
f.write(config)
mon_c = get_container(fsid, 'mon', mon_id)