about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-01-08T15·49+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-01-08T15·49+0100
commit57b82256b0544a3c54e7a8bcabd184eef9c3903a (patch)
tree911d8ac91f59797335cebe2eea8fdc370a4726bc /src/libstore/local-store.cc
parented56ea980bcee17850ff1199fbb7c0a9d8cb52cd (diff)
Doh
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 57b63408d718..01694332c948 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -251,13 +251,13 @@ LocalStore::LocalStore(bool reserveSpace)
        multi-user install. */
     if (getuid() == 0 && settings.buildUsersGroup != "") {
 
-        mode_t perm = 01737;
-
         Path perUserDir = profilesDir + "/per-user";
         createDirs(perUserDir);
-        if (chmod(perUserDir.c_str(), perm) == -1)
+        if (chmod(perUserDir.c_str(), 01777) == -1)
             throw SysError(format("could not set permissions on ‘%1%’ to 1737") % perUserDir);
 
+        mode_t perm = 01735;
+
         struct group * gr = getgrnam(settings.buildUsersGroup.c_str());
         if (!gr)
             printMsg(lvlError, format("warning: the group ‘%1%’ specified in ‘build-users-group’ does not exist")