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
- 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)
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
- Default new projects to a directory under the user home
- Check writability as soon as a directory is picked, not only at Finish
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
- Enter a file name to create a new {0} {1}
- Enter {0} file location
- {0} location path should be absolute
- Directory '{0}' is already taken by the project '{1}'. Pleas
- Enter a file name to create a new {0} {1}
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/3e2c574c567cedf5.
Report an issue: GitHub.