https://hydra.nixos.org/build/102803044
(cherry picked from commit bda64a2b0f79346012332ed18f5a76388e6d9bae)
This commit is contained in:
Eelco Dolstra 2019-10-10 00:12:30 +02:00
parent 0fb4744467
commit e3d44a3b83
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -1444,7 +1444,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, 0) == -1)
if (chown(dir.c_str(), userId, getgid()) == -1)
throw SysError("changing owner of directory '%s'", dir);
}
}