Force per-user group to a known value
(cherry picked from commit 20eec802ff11dd2b152715cd5c81b756d318219d)
This commit is contained in:
parent
fe51fbaf81
commit
2070d55b0b
1 changed files with 1 additions and 1 deletions
|
@ -1443,7 +1443,7 @@ void LocalStore::createUser(const std::string & userName, uid_t userId)
|
|||
createDirs(dir);
|
||||
if (chmod(dir.c_str(), 0755) == -1)
|
||||
throw SysError("changing permissions of directory '%s'", dir);
|
||||
if (chown(dir.c_str(), userId, -1) == -1)
|
||||
if (chown(dir.c_str(), userId, 0) == -1)
|
||||
throw SysError("changing owner of directory '%s'", dir);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue