-1

Sorry for this rudimentary question, but I am not a Linux guy at all and have never worked with Solr before.

I have deployed a new VM on Azure with the Bitnami Solr 6.4 image.

I am using the web admin UI to create a new core. It states that the instanceDir and the dataDir need to exist prior to creating the core. Upon attempting to create these directories, I am confronted with a Permission Denied issue.

mkdir /opt/bitnami/apache-solr/server/solr/extremeledcore: permission denied

It seems the owner of the solr directory is a user of solr, and only the owner is allowed to create directories. directory rights and owner

But the problem is, I have no idea the credentials of user solr. I presume it is a default user created during the install. I have a different username when logging into the VM, let's call it vmadmin, which is how I login to the server using putty and FileZilla. And attempting to mkdir in either FileZilla or Putty, results in a Permission Denied error.

Logged in as VMadmin in Putty getting error

Note it is also a bit confusing that when I login as vmadmin in putty, the prompt shows bitnami@SolrVM, which I believe is typically in the format of username@servername...but I logged in as vmadmin not bitnami....but I digress.

The only other login credientials I am aware of are for the solr admin panel itself and that user name created by the solr install is simply user. So I have no idea how to login as solr or override the properties to allow my VM admin user to mkdir.

~Windows Guy in a Linux World

crichavin
  • 4,672
  • 10
  • 50
  • 95

5 Answers5

1

The one that worked for me was:

sudo -u solr ./bin/solr create -c myCore
Brian Wirt
  • 142
  • 3
  • 9
0

Try out the following command:

 $solr_home bin/solr create_core -c extremeledcore

By using it, you should be able to create a Solr core.

Detailed documentation on how to create a core can be found here:

https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API#CoreAdminAPI-CREATE

marius_neo
  • 1,535
  • 1
  • 13
  • 28
0

According to your description, we can use sudo -i to switch user to root, so you can mkdir and you will not receive error permission denied.

bitnami@jason:~$ sudo -i
root@jason:~# whoami
root
root@jason:~# id
uid=0(root) gid=0(root) groups=0(root)
root@jason:~# 
Jason Ye
  • 13,710
  • 2
  • 16
  • 25
0

Since you are using a Bitnami image, you need to use the following commands in order to create a new core in your instance:

cd /opt/bitnami/apache-solr

sudo su solr -c './bin/solr create -c CORE-NAME'

Hope it helps.

Lefty G Balogh
  • 1,771
  • 3
  • 26
  • 40
0

In the end, the only way I got it to work was to change the user permissions on the solr directory: bitnami@SolrVM:/opt/bitnami/apache-solr/server/solr$ sudo chmod -R ugo+rw <MY_CORE_NAME>. Note the new core name folder did exist under /opt/bitnami/apache-solr/server/solr/MY_CORE_NAME as a result of the failed core create attempt.

Per this answer, I then created copied the /opt/bitnami/apache-solr/server/solr/configsets/basic_configs/conf directory to my new core directory /opt/bitnami/apache-solr/server/solr/MY_CORE_NAME/conf. Then used the Solr Admin UI via the web browser to create the core.

Community
  • 1
  • 1
crichavin
  • 4,672
  • 10
  • 50
  • 95