{"record":{"id":"3e2c574c567cedf5","repo":"JetBrains/intellij-community","slug":"directory-0-doesn-t-seem-to-be-writeable-plea","errorCode":null,"errorMessage":"Directory '{0}' doesn't seem to be writeable. Please choose another location.","messagePattern":"Directory '(.+?)' doesn't seem to be writeable\\. Please choose another location\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java","lineNumber":171,"sourceCode":"    }\n\n    String projectDirectoryPath = getPath();\n    if (StringUtil.isEmptyOrSpaces(projectDirectoryPath)) {\n      throw new ConfigurationException(JavaUiBundle.message(\"prompt.enter.project.file.location\", context.getPresentationName()));\n    }\n    if (myShouldBeAbsolute && !new File(projectDirectoryPath).isAbsolute()) {\n      throw new ConfigurationException(JavaUiBundle.message(\"file.location.should.be.absolute\", StringUtil.capitalize(context.getPresentationName())));\n    }\n\n    boolean shouldPromptCreation = isPathChangedByUser();\n    String message = JavaUiBundle.message(\"directory.project.file.directory\", context.getPresentationName());\n    if (!ProjectWizardUtil.createDirectoryIfNotExists(message, projectDirectoryPath, shouldPromptCreation)) {\n      return false;\n    }\n\n    File projectDirectory = new File(projectDirectoryPath);\n    if (projectDirectory.exists() && !projectDirectory.canWrite()) {\n      throw new ConfigurationException(JavaUiBundle.message(\"project.directory.is.not.writable\", projectDirectoryPath));\n    }\n    for (Project p : ProjectManager.getInstance().getOpenProjects()) {\n      if (ProjectUtil.isSameProject(projectDirectory.toPath(), p)) {\n        throw new ConfigurationException(JavaUiBundle.message(\"project.directory.is.already.taken\", projectDirectoryPath, p.getName()));\n      }\n    }\n    if (projectDirectory.exists() && !projectDirectory.isDirectory()) {\n      LOG.warn(String.format(\"Project '%s' directory should be a directory\", projectDirectoryPath));\n    }\n    boolean shouldContinue = true;\n    if (!ApplicationManager.getApplication().isUnitTestMode()) {\n      String fileName = defaultFormat ? name + ProjectFileType.DOT_DEFAULT_EXTENSION : Project.DIRECTORY_STORE_FOLDER;\n      File projectFile = new File(projectDirectory, fileName);\n      if (projectFile.exists()) {\n        message = CoreBundle.message(\"prompt.overwrite.project.file\", projectFile.getAbsolutePath(), context.getPresentationName());\n        shouldContinue = MessageDialogBuilder.yesNo(IdeBundle.message(\"title.file.already.exists\"), message).show() == Messages.YES;\n      }\n    }","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java#L153-L189","documentation":"Thrown by NamePathComponent.validateNameAndPath() when the target project directory exists but File.canWrite() reports it is not writable. The IDE checks writability up front because creating .idea/ or the .ipr there would otherwise fail with raw IO errors later.","triggerScenarios":"Calling validateNameAndPath() where projectDirectory.exists() && !projectDirectory.canWrite() — OS permissions deny write to the user, or the directory is on a read-only mount.","commonSituations":"Project placed under /opt or another root-owned directory; directory restored from backup with restrictive umask; network share / external drive mounted read-only; macOS/Windows ACLs deny the current user; running the IDE as a different user than the directory owner.","solutions":["Choose another writable location for the project (e.g. under your home directory)","Or fix permissions: chown/chmod the directory so the IDE's user can write (chmod u+w / chown $USER dir)","Remount the read-only filesystem read-write, or pick a directory on the local disk","On Windows, ensure the folder is not protected (e.g. under Program Files) and that no mandatory-readonly attribute is set (attrib -r)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"File dir = new File(component.getPath());\nif (dir.exists() && !dir.canWrite()) {\n  // warn and block before validateNameAndPath: pick another location\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default new projects to a directory under the user home","Check writability as soon as a directory is picked, not only at Finish"],"tags":["filesystem","permissions","project","wizard","intellij"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}