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.
This is a workaround for https://github.com/jruby/jruby/issues/6693 - stat is currently reporting incorrect values of
uid
andgid
on aarch64 linux nodes, and appears to be settinguid
andgid
to 0, ieroot
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.