On 6/7/2018 4:12 AM, Amanda Shuman wrote:
Definitely not a permissions problem - everything is run by the solr user,
which owns everything in the directories. I just can't figure out why the
default working directory is in opt rather than var (which is where it
should be according to a previous chain I was in).
But at this point I'm at a total loss, so maybe a fresh install wouldn't
hurt.
The "bin/solr" script, which is ultimately how Solr is started even when
it is installed as a service, initially sets the current working
directory to a directory that it knows as SOLR_TIP. This is the
directory containing bin, server, and others. It defaults to /opt/solr
when Solr is installed as a service.
Then just before Solr is started, the script will change the current
working directory to the server directory, which is a subdirectory of
SOLR_TIP.
So when Solr starts, the current working directory is $SOLR_TIP/server.
The service installer sets the owner of everything in SOLR_TIP to root.
The solr user has absolutely no reason to write to that directory at
all. Everything that Solr writes will be to an absolute path under the
"var dir" given during service install, which defaults to /var/solr.
THAT directory and all its contents will be owned by the user specified
during install, which defaults to solr.
The current working directory is where the developers want it, and will
not be in the "var dir". Its location is critical for correct Jetty
operation. When Solr is configured in the expected way for a service
install, it does not use the current working directory.
Thanks,
Shawn