如何授予文件夹写权限

时间:2019-03-08 00:06:03

标签: elasticsearch command-line permissions chmod

我有一个用户elasticsearch,我想授予它写该文件夹的权限

/var/lib/elasticsearch/elasticsearch/nodes/0/indices/pGmjsSJHRAiMUC5paYfjag/0 

所以我做了

chmod 777 /var/lib/elasticsearch/elasticsearch

但是我仍然收到错误消息?

failed to write in data directory [/var/lib/elasticsearch/elasticsearch/nodes/0/indices/pGmjsSJHRAiMUC5paYfjag/0] write permission is required

1 个答案:

答案 0 :(得分:1)

添加-R将递归更改权限

chmod -R 777 <path>