Ubuntu

即使存在讀取權限,Elasticsearch 也無法以“權限讀取”錯誤開始

  • May 28, 2019

我有一個符號連結/etc/elasticsearch/analysis指向安裝在/elasticdata/fileshare/analysisUbuntu 16.04 LTS Azure VM 上的驅動器。當我嘗試啟動 elasticsearch 時,出現以下權限錯誤:

Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/etc/elasticsearch/analysis" "read")

掛載的驅動器具有以下權限:

drwxrwxrwx 2 elasticsearch elasticsearch 0 May 22 22:44 analysis

符號連結具有以下權限:

lrwxrwxrwx 1 elasticsearch elasticsearch    43 May 22 22:49 analysis -> /elasticdata/fileshare/analysis/

TLDR:Symlink 歸elasticsearch使用者和組所有,似乎具有讀取權限,但在彈性搜尋啟動時我仍然收到讀取權限錯誤。

如何解決此權限錯誤?

編輯:

以下是路徑中每個步驟的權限:

/etc => drwxr-xr-x
/etc/elasticsearch => drwxr-S---
/etc/elasticsearch/analysis => lrwxrwxrwx
/elasticdata => drwxrwxrwx
/elasticdata/fileshare => drwxrwxrwx
/elasticdata/fileshare/analysis => drwxrwxrwx

您需要驗證路徑中每個步驟的權限,以及符號連結的目標:

/etc
/etc/elasticsearch
/etc/elasticsearch/analysis
/elasticdata
/elasticdata/fileshare
/elasticdata/fileshare/analysis

引用自:https://unix.stackexchange.com/questions/521588