logstash-plugins / logstash-input-file

Apache License 2.0
68 stars 101 forks source link

Only try and set permissions if permissions have changed. #295

Closed robbavey closed 3 years ago

robbavey commented 3 years ago

This is a workaround for https://github.com/jruby/jruby/issues/6693 - stat is currently reporting incorrect values of uid and gid on aarch64 linux nodes, and appears to be setting uid and gid to 0, ie root

This workaround will only attempt to call chown if the unlikely event that the permissions have changed. This will also "fallback" to a non-atomic write in the event that an atomic write fails.