mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
appsv2: zblerg I inadvertendly removed the line that update the user group x_x
This commit is contained in:
parent
63f0f08421
commit
ec4c2684f7
1 changed files with 4 additions and 0 deletions
|
@ -464,6 +464,7 @@ class SystemuserAppResource(AppResource):
|
|||
f"Failed to create system user for {self.app}", raw_msg=True
|
||||
)
|
||||
|
||||
# Update groups
|
||||
groups = set(check_output(f"groups {self.app}").strip().split()[2:])
|
||||
|
||||
if self.allow_ssh:
|
||||
|
@ -476,6 +477,9 @@ class SystemuserAppResource(AppResource):
|
|||
elif "sftp.app" in groups:
|
||||
groups.remove("sftp.app")
|
||||
|
||||
os.system(f"usermod -G {','.join(groups)} {self.app}")
|
||||
|
||||
# Update home dir
|
||||
raw_user_line_in_etc_passwd = check_output(f"getent passwd {self.app}").strip()
|
||||
user_infos = raw_user_line_in_etc_passwd.split(":")
|
||||
current_home = user_infos[5]
|
||||
|
|
Loading…
Add table
Reference in a new issue