Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed getting UID/GID of the current process #38

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed getting UID/GID of the current process
  • Loading branch information
gh0st-app1e committed Nov 29, 2021
commit 1abc647b887395b16efb7f8df5e410207ccac198
4 changes: 2 additions & 2 deletions docker/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def change_uid_grp():
user_grp_db_entries = grp.getgrnam("power_users")
uid = int(user_db_entries.pw_uid)
gid = int(user_grp_db_entries.gr_gid)
new_gid = int(os.getenv('GID', str(gid)))
new_uid = int(os.getenv('UID', str(uid)))
new_uid = os.getuid()
new_gid = os.getgid()
os.chown("/home/py-kms", new_uid, new_gid)
os.chown("/usr/bin/start.py", new_uid, new_gid)
if os.path.isfile(dbPath):
Expand Down