I have changed permission for the scripts directory to "drwxrwxr-x". But still getting the following exception:
failed to run scheduled task [org.elasticsearch.watcher.ResourceWatcherService$ResourceMonitor@3f813572] on thread pool [same]
java.security.AccessControlException: access denied ("java.io.FilePermission" "" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_66]
at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_66]
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_66]
at java.lang.SecurityManager.checkRead(SecurityManager.java:888) ~[?:1.8.0_66]
at sun.nio.fs.UnixPath.checkRead(UnixPath.java:795) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.checkAccess(UnixFileSystemProvider.java:290) ~[?:?]
at java.nio.file.Files.exists(Files.java:2385) ~[?:1.8.0_66]
at org.elasticsearch.watcher.FileWatcher$FileObserver.checkAndNotify(FileWatcher.java:93) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.watcher.FileWatcher.doCheckAndNotify(FileWatcher.java:70) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.watcher.AbstractResourceWatcher.checkAndNotify(AbstractResourceWatcher.java:44) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.watcher.ResourceWatcherService$ResourceMonitor.run(ResourceWatcherService.java:197) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.threadpool.ThreadPool$ReschedulingRunnable.doRun(ThreadPool.java:811) [elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.threadpool.ThreadPool$LoggingRunnable.run(ThreadPool.java:436) [elasticsearch-5.6.8.jar:5.6.8]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_66]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_66]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_66]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_66]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]