{"record":{"id":"4a6d130c71bbb40d","repo":"affaan-m/ECC","slug":"nasiko-install-directory-must-not-be-group-or-wor","errorCode":null,"errorMessage":"Nasiko install directory must not be group- or world-writable.","messagePattern":"Nasiko install directory must not be group- or world-writable\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/nasiko-release.js","lineNumber":161,"sourceCode":"  if (/^(?:\\\\\\\\|\\\\\\\\\\?\\\\|\\\\\\\\\\.\\\\)/.test(directory)) throw new Error('Nasiko install directory must be on a local filesystem.');\n  const resolved = path.resolve(directory);\n  if (resolved === path.parse(resolved).root) throw new Error('Nasiko cannot install directly into a filesystem root.');\n  let ancestor = resolved;\n  while (!fs.existsSync(ancestor)) {\n    const parent = path.dirname(ancestor);\n    if (parent === ancestor) throw new Error('Nasiko install directory has no resolvable filesystem ancestor.');\n    ancestor = parent;\n  }\n  const canonical = fs.realpathSync(ancestor);\n  return path.join(canonical, path.relative(ancestor, resolved));\n}\n\nfunction assertPrivateInstallDirectory(directory) {\n  const stats = fs.lstatSync(directory);\n  if (!stats.isDirectory() || stats.isSymbolicLink()) throw new Error('Nasiko install directory must be a real directory, not a symlink.');\n  if (process.platform !== 'win32') {\n    if (typeof process.getuid === 'function' && stats.uid !== process.getuid()) throw new Error('Nasiko install directory must be owned by the current user.');\n    if ((stats.mode & 0o022) !== 0) throw new Error('Nasiko install directory must not be group- or world-writable.');\n  }\n}\n\nfunction metadataPathFor(executable) { return path.join(path.dirname(executable), METADATA_FILENAME); }\n\nfunction readBoundedRegularFile(filePath, maximumBytes) {\n  const noFollow = fs.constants.O_NOFOLLOW;\n  const descriptor = fs.openSync(filePath, fs.constants.O_RDONLY | (noFollow || 0));\n  try {\n    const stats = fs.fstatSync(descriptor);\n    if (!stats.isFile() || stats.size <= 0 || stats.size > maximumBytes) return null;\n    if (!noFollow) {\n      const pathStats = fs.lstatSync(filePath);\n      if (pathStats.isSymbolicLink()\n        || pathStats.dev !== stats.dev\n        || pathStats.ino !== stats.ino\n        || pathStats.birthtimeMs !== stats.birthtimeMs) {\n        const error = new Error('Nasiko managed files must not be symbolic links or reparse points.');","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/lib/nasiko-release.js#L143-L179","documentation":"The permission check on the Nasiko install directory found group- or world-writable permission bits. A writable-by-others directory would allow another local user to tamper with the installed binary, so the installer refuses it.","triggerScenarios":"Thrown at scripts/lib/nasiko-release.js:161 when the library encounters an invalid state.","commonSituations":"Raised when input validation fails because: Nasiko install directory must not be group- or world-writable.. Typically caused by a missing, malformed, or out-of-range argument or configuration value.","solutions":["Provide a value that satisfies the validation: Nasiko install directory must not be group- or world-writable.","Check the calling command or configuration for the reported field and correct it, then retry.","Run the command with --help to review the expected input shape and allowed values."],"exampleFix":"Correct the invalid input so that the following holds: Nasiko install directory must not be group- or world-writable.","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}