[ https://issues.apache.org/jira/browse/SOLR-14084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16997328#comment-16997328 ]
Joel Bernstein commented on SOLR-14084: --------------------------------------- Let's also discuss the "userfiles" directory which is appearing in the test reports. {code:java} 30 access denied ("java.io.FilePermission" "/Users/krisden/repos/apache/lucene-solr/solr/core/src/test-files/solr/userfiles" "write"){code} This directory is created in the SolrResourceLoader as follows: {code:java} /** * Solr allows users to store arbitrary files in a special directory located directly under SOLR_HOME. * <p> * This directory is generally created by each node on startup. Files located in this directory can then be * manipulated using select Solr features (e.g. streaming expressions). */ public static final String USER_FILES_DIRECTORY = "userfiles"; public static void ensureUserFilesDataDir(Path solrHome) { final Path userFilesPath = getUserFilesPath(solrHome); final File userFilesDirectory = new File(userFilesPath.toString()); if (!userFilesDirectory.exists()) { try { final boolean created = userFilesDirectory.mkdir(); if (!created) { log.warn("Unable to create [{}] directory in SOLR_HOME [{}]. Features requiring this directory may fail.", USER_FILES_DIRECTORY, solrHome); } } catch (Exception e) { log.warn("Unable to create [" + USER_FILES_DIRECTORY + "] directory in SOLR_HOME [" + solrHome + "]. Features requiring this directory may fail.", e); } } } public static Path getUserFilesPath(Path solrHome) { return Paths.get(solrHome.toAbsolutePath().toString(), USER_FILES_DIRECTORY).toAbsolutePath(); } {code} Tests pass for me when they are run using the basic: {code:java} ant test {code} There are specific tests that exercise this directory which pass, but that may be because the tests also populate this directory with a file in a way that would create the directory if it does not exist. > Security manager access denied not causing tests to fail > -------------------------------------------------------- > > Key: SOLR-14084 > URL: https://issues.apache.org/jira/browse/SOLR-14084 > Project: Solr > Issue Type: Test > Security Level: Public(Default Security Level. Issues are Public) > Components: Tests > Reporter: Kevin Risden > Priority: Major > > FYI [~rcmuir] this is from a run where all the tests pass. > Looking at the output in ./build/solr-core/test/tests-report.txt > {code:java} > # grep -F 'access denied' tests-report.txt | cut -d':' -f2 | sort | uniq -c > 1 access denied ("java.io.FilePermission" > "/Users/krisden/repos/apache/lucene-solr/solr/build/solr-core/test/J2/temp/solr.util.TestSolrCLIRunExample_7960AD1EAA781935-001/tempDir-001/failExecuteScript" > "execute") > 952 access denied ("java.io.FilePermission" > "/Users/krisden/repos/apache/lucene-solr/solr/core/src/test-files/solr/filestore" > "write") > 30 access denied ("java.io.FilePermission" > "/Users/krisden/repos/apache/lucene-solr/solr/core/src/test-files/solr/userfiles" > "write") > 54 access denied ("java.net.SocketPermission" "----------" "resolve") > 2 access denied ("java.net.SocketPermission" "thrasher-T100" "resolve") > 4 127.0.0.1 > {code} > These didn't cause tests to fail but need to see why these are happening. I > wouldn't expect we need most of these. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org