# Doute in Environement path

**URL:** https://discuss.elastic.co/t/doute-in-environement-path/25437
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [July 13, 2015, 10:52am UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437 "2015-07-13T10:52:21Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![karthikjaps](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@karthikjaps](https://discuss.elastic.co/u/karthikjaps)
#### Post date: [July 13, 2015, 10:52am UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437/1 "2015-07-13T10:52:21Z")

</div>

hi , due to system crash , i reinstall elastic search , elastic search wotking fine , when i try to reinstall shield i add in /etc/environemnt , export ES\_JAVA\_OPTS="-Des.path.conf=/etc/elasticsearch"  
where my elasticsearch.yml file are located in /etc/elasticsearch and my elastic serach installed in /usr/share/elaastic search .

After restart elastic serach , when try to create user it shows the error  
bash: bin/shield/esusers: Permission denied  
in /etc/elastic search . no shiled folder and configuration missed ..  
may i know where i did the mistake , my enviironemnt path setting is correct ?

---

<div class="post-metadata">

### Author: ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)
#### Post date: [July 13, 2015, 11:00am UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437/2 "2015-07-13T11:00:22Z")

</div>

Hi,

I have a few questions:

1. Is the `bin/shield/esusers` script executable?
2. Did you verify that the environment variable was set properly before installing Shield? You can check with `echo $ES_JAVA_OPTS`
3. Does the user you ran `bin/shield/esusers` with have write permission on the `/etc/elasticsearch` directory?

---

<div class="post-metadata">

### Author: ![karthikjaps](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@karthikjaps](https://discuss.elastic.co/u/karthikjaps)
#### Post date: [July 13, 2015, 11:07am UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437/3 "2015-07-13T11:07:26Z")

</div>

Environment path echo $ES\_JAVA\_OPTS  
-Des.path.conf=/etc/elasticsearch

Then , esusers are executable only , when i try to execute i got an error

./esusers

Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch/common/cli/CliTool  
at java.lang.ClassLoader.defineClass1(Native Method)  
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)  
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)  
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)  
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)  
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)  
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.cli.CliTool  
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:358

i am running as root user only so problem in permission ...i have an doute that may be environment is correct and no shield folder found in /etc/elasticsearch

---

<div class="post-metadata">

### Author: ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)
#### Post date: [July 13, 2015, 11:50am UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437/4 "2015-07-13T11:50:15Z")

</div>

It looks like the Shield script is having issues finding the necessary classes. Does the /usr/share/elasticsearch/lib/elasticsearch-\*.jar file exist?

---

<div class="post-metadata">

### Author: ![karthikjaps](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@karthikjaps](https://discuss.elastic.co/u/karthikjaps)
#### Post date: [July 13, 2015, 11:58am UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437/5 "2015-07-13T11:58:18Z")

</div>

yes .  
elasticsearch-1.3.9.jar file available in /usr/share/elasticsearch/lib/

Otherwise , can i uninstall completely shield and reinstall it again ..can u give proper remove command and  
environment path

---

<div class="post-metadata">

### Author: ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)
#### Post date: [July 13, 2015, 12:15pm UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437/6 "2015-07-13T12:15:17Z")

</div>

Ok, the version of elasticsearch is probably the issue. Shield only works with Elasticsearch 1.4.2+ and I'd recommend moving to Elasticsearch 1.6 with Shield 1.3.

If you must use an older version of Elasticsearch, then Shield 1.1 is compatible with Elasticsearch 1.4.x.

---

<div class="post-metadata">

### Author: ![karthikjaps](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@karthikjaps](https://discuss.elastic.co/u/karthikjaps)
#### Post date: [July 13, 2015, 12:21pm UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437/7 "2015-07-13T12:21:42Z")

</div>

ok , i have an doute ..i am using couchbase elasticsearch plugin 2.0 , wheather this support elastic search 1.4 ?

or

i am using elasticsearch 1.3 with couchbase plugin 2.0 , which version is shield compatibility for this ?

---

<div class="post-metadata">

### Author: ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)
#### Post date: [July 13, 2015, 12:49pm UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437/8 "2015-07-13T12:49:10Z")

</div>

Are you using this plugin [https://github.com/couchbaselabs/elasticsearch-transport-couchbase](https://github.com/couchbaselabs/elasticsearch-transport-couchbase) ? If so, then take a look at their readme, it describes the versions of elasticsearch that it is compatible with.

Also, Shield is not compatible with Elasticsearch 1.3.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 1:48pm UTC](https://discuss.elastic.co/t/doute-in-environement-path/25437/9 "2017-07-06T13:48:52Z")

</div>


