Skip to content

Commit

Permalink
Show hint in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kmille committed Dec 5, 2023
1 parent 43f2f2d commit 1ce499e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions riseup_vpn_configurator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def fix_file_permissions(file: Path) -> None:
uid = pwd.getpwnam(vpn_user).pw_uid
gid = grp.getgrnam(vpn_group).gr_gid
except KeyError as e:
logging.error(f"Could not find user/group: {e}")
logging.error(f"Could not find user/group: {e}. You can adjust user/group in {config_file}")
sys.exit(1)
os.chown(file, uid, gid)
file.chmod(0o600)
Expand All @@ -405,7 +405,7 @@ def check_working_directory() -> None:
uid = pwd.getpwnam(vpn_user).pw_uid
gid = grp.getgrnam(vpn_group).gr_gid
except KeyError as e:
logging.error(f"Could not find user/group: {e}")
logging.error(f"Could not find user/group: {e}. You can adjust user/group in {config_file}")
sys.exit(1)
working_dir.mkdir(0o700)
os.chown(working_dir, uid, gid)
Expand Down

0 comments on commit 1ce499e

Please sign in to comment.