diff --git a/src/libstore/build.cc b/src/libstore/build.cc index b3d2796d81..2e2f92fadf 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2086,6 +2086,10 @@ void DerivationGoal::initChild() if (mount("none", (chrootRootDir + "/dev/pts").c_str(), "devpts", 0, "newinstance,mode=0620") == -1) throw SysError("mounting /dev/pts"); createSymlink("/dev/pts/ptmx", chrootRootDir + "/dev/ptmx"); + + /* Make sure /dev/pts/ptmx is world-writable. With some + Linux versions, it is created with permissions 0. */ + chmod_(chrootRootDir + "/dev/pts/ptmx", 0666); } /* Do the chroot(). Below we do a chdir() to the