fluent / fluentd

Fluentd: Unified Logging Layer (project under CNCF)
https://www.fluentd.org
Apache License 2.0
12.82k stars 1.34k forks source link

in_unix plugin does not work with --under-supervisor (permission denied with var/run/fluent/fluent.sock) #4333

Open sijin-won opened 10 months ago

sijin-won commented 10 months ago

Describe the bug

We run fluentd without any the command line option(automatically with --under-supervisor). the in_unix plugin didn't work because the socket file's permission was insufficient.

$ ls -l /var/run/fluent/fluent.sock
srwxr-xr-x 1 _fluentd _fluentd 0 Oct 26 08:27 /var/run/fluent/fluent.sock

To Reproduce

  1. Install fluent with the following command
    # fluent-package 5 (LTS)
    curl -fsSL https://toolbelt.treasuredata.com/sh/install-ubuntu-jammy-fluent-package5-lts.sh | sh
  2. add configuration
    <source>
    @type unix
    path /var/run/fluent/fluent.sock
    </source>
  3. restart fluentd with the following command
    $ sudo systemctl restart fluentd.service
  4. The created /var/run/fluent/fluent.sock file can not be written
    $ ls -l /var/run/fluent/fluent.sock
    srwxr-xr-x 1 _fluentd _fluentd 0 Oct 26 08:27 /var/run/fluent/fluent.sock

Expected behavior

The permission should be srwxrwxrwx.

Your Environment

- Fluentd version:

$ sudo fluent-gem list | grep fluentd
fluentd (1.16.2)

Your Configuration

<source>
  @type unix
  path /var/run/fluent/fluent.sock
</source>

Your Error Log

nothing

Additional context

No response

ashie commented 9 months ago

Expected behavior

The permission should be srwxrwxrwx.

Hmm, it should be customizable.