I have a linux system and installed solr 9.2.0 and started solr. My solr installation path is /opt/solr-9.2.0/ and I tried creating a core by doing the following steps
mkdir -p /opt/solr-9.2.0/server/solr/samplecore/conf
cp -pr /opt/solr-9.2.0/server/solr/configsets/sample_techproducts_configs/conf /opt/solr-9.2.0/server/solr/samplecore
I created core.properties in the location /opt/solr-9.2.0/server/solr/samplecore/ with below content by referring to a sample version from another very old version installation
#Written by CorePropertiesLocator
#Wed May 03 17:32:11 PDT 2023
name=samplecore
config=solrconfig.xml
schema=schema.xml
dataDir=/index/dev/solr/samplecore
I started solr as below
/opt/solr-9.2.0/bin/solr start -h mylinuxbox -p 8983
After this I visited http://mylinuxbox:8983/solr in browser and expected to see the created core but i 'm getting an error as follows
SolrCore Initialization Failures samplecore: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: access denied ("java.io.FilePermission" "/index/dev/solr/samplecore/snapshot_metadata" "read") Please check logs for more information.
Is there any other setting or configuration I am missing? I need the solr to use /index/dev/solr/samplecore path for index data. Please help me with this. I am new to solr and java.
I have explained in the description everything I tried
We noticed that when creating a new core on v9, you cannot point the data directory to a directory that is not within the core's root directory. So in your example, you might need to change your
core.propertiesto:Note that creating a symlink to the data directory (if it's outside of the core's root directory) also causes the same error to occur.