Create a project with settings:
. Module mod-java: has no facets.
. Module mod-ejb: depends on mod-java, has ejb facet.
In EJB facet packaging options set "JAR module" for mod-java.
Set On either "Create EJB jar" or "Create EJB exploded directory" options (bug happens in both cases).
Make project or mod-ejb. Get error: "Access is denied".
Does not happen in case of "Copy module output" packaging option.
. Option "Allow to copy packaged files outside the exploded directory or jar" is On.
. Packaging method is "JAR module, link with manifest", not "JAR module output".