You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Better document in_tail's need for read permission
- Clarify that td-agent is *default* user of process
- Describe that cap_dac_read_search may also be used
in addition to usermod
Related:
- fluent/fluentd#3525
- fluent/fluentd#3478
Signed-off-by: Brad Solomon <81818815+brsolomon-deloitte@users.noreply.github.com>
Copy file name to clipboardExpand all lines: input/tail.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -417,6 +417,17 @@ If you see this message:
417
417
418
418
It means that `fluentd` does not have read permission for `/path/to/file`. Check your fluentd and target files permission.
419
419
420
+
**Note**: When `td-agent` is launched by systemd, the default user of the `td-agent` process is the `td-agent` user.
421
+
You must ensure that this user has read permission to the tailed `/path/to/file`. For instance, on Ubuntu,
422
+
the default Nginx access file `/var/log/nginx/access.log` is mode `0640` and owned by `www-data:adm`. In
423
+
this case, several options are available to allow read access:
424
+
425
+
1. Add the `td-agent` user to the `adm` group, e.g. through `usermod -aG`, or
426
+
2. Use the [`cap_dac_read_search` capability](../deployment/linux-capability#capability-handling-on-in_tail)
427
+
to allow the invoking user to read the file without otherwise changing its permission bits or ownership.
428
+
429
+
A bug exists in Fluentd 1.13.x where it may suppress warning logs about unreadable files. (See Fluentd PR [#3478](https://github.com/fluent/fluentd/pull/3478).)
430
+
420
431
### `logrotate` Setting
421
432
422
433
`logrotate` has the `nocreate` parameter and it does not create a new file if log rotation is triggered. It means `in_tail` cannot find the new file to tail.
0 commit comments