diff --git a/tool/tbot/botfs/fs_linux.go b/tool/tbot/botfs/fs_linux.go index c0e010569c40a..592c437586f1c 100644 --- a/tool/tbot/botfs/fs_linux.go +++ b/tool/tbot/botfs/fs_linux.go @@ -98,10 +98,13 @@ func openSymlinksMode(path string, symlinksMode SymlinksMode) (*os.File, error) case SymlinksTrySecure: file, err = openSecure(path) if err == unix.ENOSYS { - log.Warnf("Failed to write to %q securely due to missing "+ - "syscall; falling back to regular file write. Set "+ - "`symlinks: insecure` on this destination to disable this "+ - "warning.", path) + missingSyscallWarning.Do(func() { + log.Warnf("Failed to write to %q securely due to missing "+ + "syscall; falling back to regular file write. Set "+ + "`symlinks: insecure` on this destination to disable this "+ + "warning.", path) + }) + file, err = openStandard(path) if err != nil { return nil, trace.Wrap(err)