mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-04 08:53:42 +00:00
shadowsocks: Fix shadowsocks not able to start
Shadowsocks is unable to read its own configuration file because it doesn't have read permissions to the file. Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> [jvalleroy: Add comment about security concerns] Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
61545d1b8d
commit
976668d89b
@ -60,7 +60,10 @@ def subcommand_merge_config(arguments):
|
||||
new_config.update(config)
|
||||
new_config = json.dumps(new_config, indent=4, sort_keys=True)
|
||||
|
||||
old_umask = os.umask(0o027)
|
||||
# XXX: Config file with password is world-readable. This is the
|
||||
# same as the default config file, but find a way to avoid this.
|
||||
# See https://salsa.debian.org/freedombox-team/plinth/-/merge_requests/1724
|
||||
old_umask = os.umask(0o022)
|
||||
try:
|
||||
open(SHADOWSOCKS_CONFIG, 'w').write(new_config)
|
||||
finally:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user