diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2025-01-23 12:13:01 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-03-26 17:57:44 +0100 |
| commit | a3d6f5ae70298b9b2ff357435ff5925cc6563b1a (patch) | |
| tree | ac58c863d980fb523ecce15b056af89bbf721d6e /nix | |
| parent | ae18b3d9e6bd0c184505a094851448d08555e23e (diff) | |
daemon: Create /var/guix/profiles/per-user unconditionally.
* nix/libstore/local-store.cc (LocalStore::LocalStore): Create
‘perUserDir’ unconditionally.
Change-Id: I5188320f9630a81d16f79212d0fffabd55d94abe
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/libstore/local-store.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc index 83e6c3e16ec..f6540c2117d 100644 --- a/nix/libstore/local-store.cc +++ b/nix/libstore/local-store.cc | |||
| @@ -79,12 +79,12 @@ LocalStore::LocalStore(bool reserveSpace) | |||
| 79 | createSymlink(profilesDir, gcRootsDir + "/profiles"); | 79 | createSymlink(profilesDir, gcRootsDir + "/profiles"); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | /* Optionally, create directories and set permissions for a | 82 | Path perUserDir = profilesDir + "/per-user"; |
| 83 | multi-user install. */ | 83 | createDirs(perUserDir); |
| 84 | |||
| 85 | /* Optionally, set permissions for a multi-user install. */ | ||
| 84 | if (getuid() == 0 && settings.buildUsersGroup != "") { | 86 | if (getuid() == 0 && settings.buildUsersGroup != "") { |
| 85 | 87 | ||
| 86 | Path perUserDir = profilesDir + "/per-user"; | ||
| 87 | createDirs(perUserDir); | ||
| 88 | if (chmod(perUserDir.c_str(), 0755) == -1) | 88 | if (chmod(perUserDir.c_str(), 0755) == -1) |
| 89 | throw SysError(format("could not set permissions on '%1%' to 755") | 89 | throw SysError(format("could not set permissions on '%1%' to 755") |
| 90 | % perUserDir); | 90 | % perUserDir); |
