mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 14:36:16 +02:00
Do not attempt to chmod per-user dir when read-only.
This commit is contained in:
parent
de359da09a
commit
79583c2d38
1 changed files with 4 additions and 2 deletions
|
@ -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