I've downloaded Tika in the proper location and have tried setting the settings for Search API Attachments but I'm getting this error:

Tika jar file is not an executable jar. Please check if you have not downloaded a corrupted jar file.

What is going on?

Could this be the result of ModSecurity denying access to the jar file? If so, what would be proper settings for a rule? What would the proper argument(s) be ("argument_name_here" below)? Will this rule work as-is with the structure and options below with the proper argument(s) in place?

  SecRule REQUEST_FILENAME "^/var/apache-tika/tika-app-1.8\.jar$" id:99995,log,phase:2,chain,allow
  SecRule ARGS_NAMES "^argument_name_here$"

Can this be abused? Is this a major security hole being opened by setting up a rule like this? I can't use this module nor will I add this rule if it's not secure since I really don't have to use Search API Attachments anyway.

Thanks for your time!

CommentFileSizeAuthor
#5 Untitled.png94.49 KBrosman21

Comments

deanflory’s picture

Issue summary: View changes
izus’s picture

this means that the .jar file seems to be corrupted.
actually can you test this on your server :

java -jar /var/apache-tika/tika-app-1.8.jar --help

if this throws some errors that means the .jar is really corrupted

no clue for ModSecurity, maybe someone else can answer this

izus’s picture

Status: Active » Closed (cannot reproduce)

Please feel free to reopen if the issue subsists
Thanks

jbfelix’s picture

Resolved by changing directory permissions to 755 on /var/apache-tika
and file permissions to 755 on /var/apache-tika/tika-app-1.x.jar

rosman21’s picture

StatusFileSize
new94.49 KB

Sorry to open this issue back up but I am getting the same error as OP, I am on windows 7. I ran tika on the server and it is working perfectly, parsing all my documents with any issues but I am getting the:

There may be a problem with tika path.
Tika jar file is not an executable jar. Please check if you have not downloaded a corrupted jar file.

rosman21’s picture

Version: 7.x-1.x-dev » 7.x-1.11
Status: Closed (cannot reproduce) » Active
izus’s picture

Status: Active » Closed (cannot reproduce)

i tested and can't reproduce this.
please feel free to reopen if this stills occur.