JetBrains/intellij-community · error · ConfigurationException

Directory '{0}' doesn't seem to be writeable. Please choose

Error message

Directory '{0}' doesn't seem to be writeable. Please choose another location.

What it means

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.

Source

Thrown at java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java:171

    }

    String projectDirectoryPath = getPath();
    if (StringUtil.isEmptyOrSpaces(projectDirectoryPath)) {
      throw new ConfigurationException(JavaUiBundle.message("prompt.enter.project.file.location", context.getPresentationName()));
    }
    if (myShouldBeAbsolute && !new File(projectDirectoryPath).isAbsolute()) {
      throw new ConfigurationException(JavaUiBundle.message("file.location.should.be.absolute", StringUtil.capitalize(context.getPresentationName())));
    }

    boolean shouldPromptCreation = isPathChangedByUser();
    String message = JavaUiBundle.message("directory.project.file.directory", context.getPresentationName());
    if (!ProjectWizardUtil.createDirectoryIfNotExists(message, projectDirectoryPath, shouldPromptCreation)) {
      return false;
    }

    File projectDirectory = new File(projectDirectoryPath);
    if (projectDirectory.exists() && !projectDirectory.canWrite()) {
      throw new ConfigurationException(JavaUiBundle.message("project.directory.is.not.writable", projectDirectoryPath));
    }
    for (Project p : ProjectManager.getInstance().getOpenProjects()) {
      if (ProjectUtil.isSameProject(projectDirectory.toPath(), p)) {
        throw new ConfigurationException(JavaUiBundle.message("project.directory.is.already.taken", projectDirectoryPath, p.getName()));
      }
    }
    if (projectDirectory.exists() && !projectDirectory.isDirectory()) {
      LOG.warn(String.format("Project '%s' directory should be a directory", projectDirectoryPath));
    }
    boolean shouldContinue = true;
    if (!ApplicationManager.getApplication().isUnitTestMode()) {
      String fileName = defaultFormat ? name + ProjectFileType.DOT_DEFAULT_EXTENSION : Project.DIRECTORY_STORE_FOLDER;
      File projectFile = new File(projectDirectory, fileName);
      if (projectFile.exists()) {
        message = CoreBundle.message("prompt.overwrite.project.file", projectFile.getAbsolutePath(), context.getPresentationName());
        shouldContinue = MessageDialogBuilder.yesNo(IdeBundle.message("title.file.already.exists"), message).show() == Messages.YES;
      }
    }

View on GitHub (pinned to be881553f2)

Solutions

  1. Choose another writable location for the project (e.g. under your home directory)
  2. Or fix permissions: chown/chmod the directory so the IDE's user can write (chmod u+w / chown $USER dir)
  3. Remount the read-only filesystem read-write, or pick a directory on the local disk
  4. On Windows, ensure the folder is not protected (e.g. under Program Files) and that no mandatory-readonly attribute is set (attrib -r)
Defensive patterns

Strategy: validation

Validate before calling

File dir = new File(component.getPath());
if (dir.exists() && !dir.canWrite()) {
  // warn and block before validateNameAndPath: pick another location
}

Prevention

When it happens

Trigger: Calling validateNameAndPath() where projectDirectory.exists() && !projectDirectory.canWrite() — OS permissions deny write to the user, or the directory is on a read-only mount.

Common situations: 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.

Related errors


AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14). Data as JSON: /api/errors/3e2c574c567cedf5. Report an issue: GitHub.