jprante / elasticsearch-knapsack

Knapsack plugin is an import/export tool for Elasticsearch
Apache License 2.0
472 stars 77 forks source link

Permission Denied when exporting #5

Closed Mic92 closed 10 years ago

Mic92 commented 11 years ago

I got the following error, when start exporting:

[2013-04-25 17:59:09,217][INFO ][rest.action              ] [boston] starting export to entities
[2013-04-25 17:59:09,218][ERROR][rest.action              ] [boston] entities.tar.gz (Permission denied)
java.io.FileNotFoundException: entities.tar.gz (Permission denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:209)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:160)
        at org.xbib.io.tar.TarSession.createFileOutputStream(TarSession.java:185)
        at org.xbib.io.tar.TarSession.open(TarSession.java:112)
        at org.elasticsearch.rest.action.RestExportAction$1.run(RestExportAction.java:128)
        at java.lang.Thread.run(Thread.java:679)

To which directory your plugin tries to export the data? I installed the application to /usr/local/elasticsearch:

$ ls -la
insgesamt 48
drwxr-xr-x  6 elasticsearch elasticsearch  4096 Apr 25 17:34 .
drwxr-xr-x 13 root          root           4096 Apr 25 16:02 ..
drwxr-xr-x  2 elasticsearch elasticsearch  4096 Apr 17 22:15 bin
drwxr-xr-x  2 elasticsearch elasticsearch  4096 Apr 18 15:54 config
drwxr-xr-x  3 elasticsearch elasticsearch  4096 Apr 17 22:15 lib
-rwxr-xr-x  1 elasticsearch elasticsearch 11358 Okt 14  2012 LICENSE.txt
-rwxr-xr-x  1 elasticsearch elasticsearch   165 Okt 14  2012 NOTICE.txt
drwxr-xr-x  3 elasticsearch elasticsearch  4096 Apr 25 17:35 plugins
-rwxr-xr-x  1 elasticsearch elasticsearch  7935 Okt 14  2012 README.textile

The data path is /usr/local/var/data/elasticsearch:

$ ls -la
insgesamt 12
drwxr-xr-x 3 elasticsearch elasticsearch 4096 Apr 17 22:16 .
drwxr-xr-x 3 root          root          4096 Apr 17 22:15 ..
drwxrwxr-x 3 elasticsearch elasticsearch 4096 Apr 17 22:16 elasticsearch

Thanks in advance

timwaters commented 11 years ago

use the target parameter

btiernay commented 11 years ago

@timwaters fair enough, but it reports {"ok":true}. It should probably indicate that it couldn't write to the specified directory.

jprante commented 10 years ago

This has been solved in the latest release.

ThaleJacobs-TomTom commented 10 years ago

Hi - I am having the same (Permission denied). I am tried the following plugin versions: ./bin/plugin -install knapsack -url http://bit.ly/1f1hk1c ./bin/plugin -install knapsack -url http://bit.ly/1mlzYoB ./bin/plugin -install knapsack -url http://bit.ly/1cMFCX3

And they all experienced the same issue. I used your example for the test: curl -XPOST 'localhost:9200/test/_export?path=/tmp/myarchive.zip'

BTW - I am using ES 0.90.10 (and are kind of stuck on it for a while, so I cannot just upgrade to the latest ES because of other dependencies)

Thanks.