Commit 2850b26
authored
Add warning for directory permission to in_tail.rb (#4865)
**Which issue(s) this PR fixes**:
~~Fixes #~~
**What this PR does / why we need it**:
This PR provides a warning for typical configuration mistakes that
prevent log transfer from starting.
When using the tail type as a source, it is common for directories with
inappropriate partitions to be mistakenly included in the source path.
In my opinion, it would be preferable to issue a warning in such cases
to help users avoid these mistakes.
Steps to Reproduce:
```shell
$ sudo mkdir /var/log/noaccess
$ sudo mkdir /var/log/noaccess/noaccess2
$ sudo touch /var/log/noaccess/noaccess2/fluentd.log
$ sudo chmod 0000 /var/log/noaccess
$ sed -Ei 's|^([[:space:]]*)path .*|\1path /var/log/noaccess/noaccess2/fluentd.log|' example/in_tail.conf
$ bundle exec fluentd -c example/in_tail.conf
{no warning...}
```
**Docs Changes**:
No documentation changes required.
**Release Note**:
in_tail: add warning for directory permission.
Signed-off-by: Tomoaki Kobayashi <[email protected]>1 parent 921b93f commit 2850b26
2 files changed
+62
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
215 | 230 | | |
216 | 231 | | |
217 | 232 | | |
| |||
321 | 336 | | |
322 | 337 | | |
323 | 338 | | |
324 | | - | |
| 339 | + | |
325 | 340 | | |
326 | 341 | | |
327 | 342 | | |
| |||
367 | 382 | | |
368 | 383 | | |
369 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
370 | 389 | | |
371 | 390 | | |
372 | | - | |
373 | | - | |
| 391 | + | |
| 392 | + | |
374 | 393 | | |
375 | 394 | | |
376 | 395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2592 | 2592 | | |
2593 | 2593 | | |
2594 | 2594 | | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
2595 | 2635 | | |
2596 | 2636 | | |
2597 | 2637 | | |
| |||
0 commit comments