mirror of
https://github.com/NixOS/nix
synced 2024-09-20 11:11:03 -04:00
Do not attempt to chmod per-user dir when read-only.
This commit is contained in:
parent
de359da09a
commit
79583c2d38
|
@ -204,9 +204,11 @@ LocalStore::LocalStore(const Params & params)
|
|||
|
||||
for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) {
|
||||
createDirs(perUserDir);
|
||||
if (!readOnly) {
|
||||
if (chmod(perUserDir.c_str(), 0755) == -1)
|
||||
throw SysError("could not set permissions on '%s' to 755", perUserDir);
|
||||
}
|
||||
}
|
||||
|
||||
/* Optionally, create directories and set permissions for a
|
||||
multi-user install. */
|
||||
|
|
Loading…
Reference in a new issue