In my 8.8.2 Elasticsearch container, I have this cron job in the cron table:
* 1 * * * su elasticsearch /bin/bash -c "export ES_CURATOR_USERNAME=curator ES_CURATOR_PASSWORD=xxxxx; /usr/local/bin/curator --config /config/curator-config.yml /config/curator-actions.yml"
In ES 7.17.9, this would work well to age off indices every evening at 1 a.m.
However, now when this runs I get:
Traceback (most recent call last):
  File "/usr/local/bin/curator", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/curator/cli.py", line 316, in cli
    set_logging(check_logging_config(
  File "/usr/local/lib/python3.8/dist-packages/curator/config_utils.py", line 51, in set_logging
    loginfo = LogInfo(log_opts)
  File "/usr/local/lib/python3.8/dist-packages/curator/logtools.py", line 136, in __init__
    self.handler = logging.FileHandler('/proc/1/fd/1')
  File "/usr/lib/python3.8/logging/__init__.py", line 1147, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.8/logging/__init__.py", line 1176, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
PermissionError: [Errno 13] Permission denied: '/proc/1/fd/1'
I have found that if this command runs as the Linux root user (same curator username and password) it seems to run fine (although the output is owned by the root user and not the elasticsearch user).
Are we now required to use the root user for curator actions in crontab if the output is redirected to a file? We have used the elasticsearch user for years to run cron jobs.