{"record":{"id":"69804c3efc25ada2","repo":"bmad-code-org/BMAD-METHOD","slug":"label-is-not-readable-dirpath","errorCode":null,"errorMessage":"${label} is not readable: ${dirPath}","messagePattern":"(.+?) is not readable: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"tools/installer/core/install-paths.js","lineNumber":88,"sourceCode":"    return path.join(this.bmadDir, name);\n  }\n  moduleConfig(name) {\n    return path.join(this.bmadDir, name, 'config.yaml');\n  }\n}\n\nasync function assertReadableDir(dirPath, label) {\n  const stat = await fs.stat(dirPath).catch(() => null);\n  if (!stat) {\n    throw new Error(`${label} does not exist: ${dirPath}`);\n  }\n  if (!stat.isDirectory()) {\n    throw new Error(`${label} is not a directory: ${dirPath}`);\n  }\n  try {\n    await fs.access(dirPath, fs.constants.R_OK);\n  } catch {\n    throw new Error(`${label} is not readable: ${dirPath}`);\n  }\n}\n\nasync function assertReadableFile(filePath, label) {\n  const stat = await fs.stat(filePath).catch(() => null);\n  if (!stat) {\n    throw new Error(`${label} does not exist: ${filePath}`);\n  }\n  if (!stat.isFile()) {\n    throw new Error(`${label} is not a file: ${filePath}`);\n  }\n  try {\n    await fs.access(filePath, fs.constants.R_OK);\n  } catch {\n    throw new Error(`${label} is not readable: ${filePath}`);\n  }\n}\n","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/bmad-code-org/BMAD-METHOD/blob/b70486b9bdcb0a404d329e2a763b57964e7f1360/tools/installer/core/install-paths.js#L70-L106","documentation":"Thrown by assertReadableDir when the directory exists and is a directory, but fs.access with R_OK fails — the current process lacks read permission. This isolates a permission problem from a missing/wrong-type path.","triggerScenarios":"InstallPaths.create() validates the BMAD source root and the directory is present but the OS denies read access to the running user (EACCES).","commonSituations":"Running the installer as a different user than the one that owns the directory, directories created with restrictive umask, or running inside a container/sandbox with a read-mask on the mount.","solutions":["Grant read access: `chmod +r <dirPath>` or `chown` it to the current user.","Run the installer as a user that owns the BMAD source tree.","Check for a read-only container mount and remount read-write or fix ownership."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"await fs.access(dirPath, fs.constants.R_OK); // throws EACCES if unreadable","typeGuard":null,"tryCatchPattern":"try {\n  await assertReadableDir(dirPath, label);\n} catch (error) {\n  if (error.message.includes('is not readable')) { /* fix perms */ }\n  throw error;\n}","preventionTips":["Run the installer as the owner of the BMAD source tree.","Ensure umask allows reads on shipped directories."],"tags":["filesystem","permissions","precondition","installer"],"backgroundTag":null,"analyzedSha":"b70486b9bdcb0a404d329e2a763b57964e7f1360","analyzedAt":"2026-08-13T01:21:12.247Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}