Skip to content

Commit 2070d55

Browse files
committed
Force per-user group to a known value
(cherry picked from commit 20eec80)
1 parent fe51fba commit 2070d55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstore/local-store.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ void LocalStore::createUser(const std::string & userName, uid_t userId)
14431443
createDirs(dir);
14441444
if (chmod(dir.c_str(), 0755) == -1)
14451445
throw SysError("changing permissions of directory '%s'", dir);
1446-
if (chown(dir.c_str(), userId, -1) == -1)
1446+
if (chown(dir.c_str(), userId, 0) == -1)
14471447
throw SysError("changing owner of directory '%s'", dir);
14481448
}
14491449
}

0 commit comments

Comments
 (0)