Skip to content

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

Open
@sijin-won

Description

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
  1. add configuration
<source>
  @type unix
  path /var/run/fluent/fluent.sock
</source>
  1. restart fluentd with the following command
$ sudo systemctl restart fluentd.service
  1. 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)
  • TD Agent version:
  • Operating system:
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
  • Kernel version:
$ uname -r
6.2.0-1017-gcp

Your Configuration

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

Your Error Log

nothing

Additional context

No response

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature request or improve operations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions