diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a43e844f..622243458 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ be deprecated eventually. - [#2380](https://github.com/influxdata/telegraf/issues/2380): buffer_size field value is negative number from "internal" plugin. - [#2414](https://github.com/influxdata/telegraf/issues/2414): Missing error handling in the MySQL plugin leads to segmentation violation. - [#2178](https://github.com/influxdata/telegraf/issues/2178): logparser: regexp with lookahead. +- [#2466](https://github.com/influxdata/telegraf/issues/2466): Telegraf can crash in LoadDirectory on 0600 files. ## v1.2.1 [2017-02-01] diff --git a/internal/config/config.go b/internal/config/config.go index 90b158716..651c4e9ef 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -505,6 +505,10 @@ func PrintOutputConfig(name string) error { func (c *Config) LoadDirectory(path string) error { walkfn := func(thispath string, info os.FileInfo, _ error) error { + if info == nil { + log.Printf("W! Telegraf is not permitted to read %s", thispath) + return nil + } if info.IsDir() { return nil }