elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Incorrect permissions inside the Docker container?

Open webhead404 opened this issue 5 years ago • 3 comments

Using default settings specified in the ReadMe of ElastAlert Server the associated Kibana plugin doesn't create rule files with the default rule location.

`03:06:24.149Z ERROR elastalert-server: Routes: Request for '/rules/:id' failed with error:

 [Error: EACCES: permission denied, open '/opt/elastalert/rules/hacky_hack.yaml'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/opt/elastalert/rules/hacky_hack.yaml'

webhead404 avatar Jun 16 '19 03:06 webhead404

same issue here using version 3.0.0-beta

HamidSajjadi avatar Jun 25 '19 11:06 HamidSajjadi

Using default settings specified in the ReadMe of ElastAlert Server the associated Kibana plugin doesn't create rule files with the default rule location.

`03:06:24.149Z ERROR elastalert-server: Routes: Request for '/rules/:id' failed with error:

 [Error: EACCES: permission denied, open '/opt/elastalert/rules/hacky_hack.yaml'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/opt/elastalert/rules/hacky_hack.yaml'

you can chmod -R 777 rules on the host directory "elastalert"

zffocussss avatar Jun 26 '19 14:06 zffocussss

what should i do if i am unable to change permission?

drwxrwxrwx 1 node node 4096 May 14 09:18 elastalert

drwxr-xr-x 2 root root 6 Jun 25 07:43 rules

/opt/elastalert $ chmod -R 777 rules
chmod: rules: Operation not permitted

Update.. i think i have managed to solve it by deleting the rule folder and creating with the right permission before mounting it with the docker run command

zhongxian93 avatar Jun 27 '19 03:06 zhongxian93