We have configured smb shared folder between elastic stack servers, that contain the logstash.keystore file.
This storage is mounted in for example /mnt/elastic folder
the file /mnt/elastic/logstash.keystore is symlinked into /etc/logstash/logstash.keystore and for sure also into /usr/share/logstash/config/logstash.keystore.
The environment variables are setuped.
When i run following command, It works well:
./bin/logstash-keystore list
When I try to remove not existing key, it also properly detect, that key does not exists
But when I try to add a new key, it fail for following error:
ERROR] 2020-01-02 15:58:33.245 [main] secretstorecli - Error while trying to store secret urn:logstash:secret:v1:new_key {:cause=>java.io.IOException: Permission denied, :backtrace=>["org.logstash.secret.store.backend.JavaKeyStore.persistSecret(org/logstash/secret/store/backend/JavaKeyStore.java:318)", "org.logstash.secret.cli.SecretStoreCli.add(org/logstash/secret/cli/SecretStoreCli.java:169)", "org.logstash.secret.cli.SecretStoreCli.command(org/logstash/secret/cli/SecretStoreCli.java:104)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)", "org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:425)", "org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:292)", "RUBY.<class:SecretStoreCli>(/usr/share/logstash/lib/secretstore/cli.rb:35)", "RUBY.<main>(/usr/share/logstash/lib/secretstore/cli.rb:16)", "org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:889)", "org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:893)", "org.jruby.Ruby.runNormally(org/jruby/Ruby.java:782)", "org.jruby.Ruby.runNormally(org/jruby/Ruby.java:795)", "org.jruby.Ruby.runFromMain(org/jruby/Ruby.java:607)", "org.jruby.Main.doRunFromMain(org/jruby/Main.java:412)", "org.jruby.Main.internalRun(org/jruby/Main.java:304)", "org.jruby.Main.run(org/jruby/Main.java:234)", "org.jruby.Main.main(org/jruby/Main.java:206)"]}
I have tried almost everything:
User: logstash or elastic
Group: elastic
mask: 600, 660, 666
What can I do more?