janhoy commented on a change in pull request #653: URL: https://github.com/apache/solr/pull/653#discussion_r811247161
########## File path: solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.java ########## @@ -563,28 +562,14 @@ public static boolean isMetaDataFile(String file) { return file.charAt(0) == '.' && file.endsWith(".json"); } - private void ensurePackageStoreDir(Path solrHome) { - final File packageStoreDir = getPackageStoreDirPath(solrHome).toFile(); - if (!packageStoreDir.exists()) { - try { - final boolean created = packageStoreDir.mkdirs(); - if (!created) { - log.warn("Unable to create [{}] directory in SOLR_HOME [{}]. Features requiring this directory may fail.", packageStoreDir, solrHome); - } - } catch (Exception e) { - log.warn("Unable to create [{}] directory in SOLR_HOME [{}]. Features requiring this directory may fail.", packageStoreDir, solrHome, e); - } - } - } - public static synchronized Path getPackageStoreDirPath(Path solrHome) { var path = solrHome.resolve(PackageStoreAPI.PACKAGESTORE_DIRECTORY); if (!Files.exists(path)) { try { Files.createDirectories(path); log.info("Created filestore folder {}", path); } catch (IOException e) { Review comment: It is thrown by Security Manager, right? Which is default enabled in 9.0 (but deprecated in JDK17). The path that was denied was ``` java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/jenkins/jenkins-slave/workspace/Solr/Solr-Check-main/solr/core/build/resources/test/solr/filestore" "write") ``` So obviously our code tried to create that folder in the "build/resources/test/solr/" folder, which must have been disallowed by our [solr-tests.policy](https://github.com/apache/solr/blob/main/gradle/testing/randomization/policies/solr-tests.policy) If we need to check for `AccessControlException` here, we'd likely need the same in 100 other locations across our code base? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org