Secure File Transfer Audit Logs: What to Record and How Long to Keep Them

A useful transfer audit log answers who moved which file, when, from where, by what method and with what result, in a form that cannot be quietly edited. Record authentication, transfer, permission and configuration events, keep secrets and file contents out of the records, centralize and protect them, and set retention from your legal, contractual and investigation needs instead of a tool default. Then review them on a schedule so the logs are evidence you have already looked at.
Compare managed file transfer and SFTP software on SecureTools.
Why Transfer Logs Matter Before Anything Goes Wrong
File transfers are the moments when data crosses a boundary: from one system to another, from your organization to a partner, or from a production server to a backup target. When something goes wrong, such as a missing batch, an unexpected download or a partner who says a file never arrived, the transfer log is usually the only neutral witness. Without it, the discussion becomes one person's memory against another's.
Logs also serve three quieter purposes. They let operations teams confirm that scheduled jobs ran. They give security teams a trail to follow when an account looks compromised. And they give auditors evidence that controls operate in practice and not just on paper.
This guide covers secure file transfer audit logs: the records produced by transfer tools such as SFTP servers and managed file transfer platforms. It does not repeat the viewer-analytics material in how to track shared file access, and it assumes you already know what managed file transfer is. The goal is simple: when someone asks what happened to a file, you can answer from records you trust.
The Five Questions Every Transfer Record Should Answer
A log line is only useful if it answers questions someone will actually ask. Five of them cover nearly every investigation:

- Who: the user, service account or partner identity that started the transfer, and how it authenticated.
- What: the file or object that moved, identified by name, path and ideally a checksum, never by its contents.
- When: the exact time, in a consistent time zone, with a start and an end for long transfers.
- From where and to where: source address, destination, and the protocol or channel used.
- With what result: success, partial, failed or rejected, plus the reason when it was not a success.
If your tool cannot answer one of these, note the gap now instead of during an incident. The five questions also make a good evaluation test: ask your administrator or vendor to show one real record for a single transfer and tick each question off.
For regulated or sensitive data, add a sixth: under whose authority. That means a link back to the ticket, schedule or approval that allowed the transfer, so reviewers can tell a planned job from an improvised one.
Events Worth Recording Across a Transfer Lifecycle
Transfers are more than the upload and the download. Events happen before, during and after, and each stage tells a different story. The table groups the events most teams need.
| Stage | Events to record | Why it matters |
|---|---|---|
| Access | Login success and failure, key or password changes, lockouts, new key registration | Shows credential attacks and unauthorized account changes |
| Authorization | Permission denied, access to a path outside a user's area, role changes | Reveals attempts to reach data beyond a user's scope |
| Transfer | Upload, download, rename, delete, overwrite, directory listing, resumed or aborted transfers | Reconstructs exactly what moved or changed |
| Automation | Job start, job end, retry, failure, skipped file, schedule changes | Proves scheduled work ran and exposes silent failures |
| Administration | Configuration changes, new partner setup, certificate or key rotation, log setting changes | Shows who altered the controls themselves |
| Integrity | Checksum match or mismatch, size mismatch, partial transfer | Separates a completed transfer from a damaged one |
OWASP's logging guidance lists similar categories for applications, including authentication results, authorization failures, configuration changes and higher-risk actions such as data import and export and file uploads (OWASP Logging Cheat Sheet). Transfer systems are applications in this sense, so the same thinking applies.
Pay particular attention to deletes, overwrites and directory listings. They are easy to omit because they are not transfers in the narrow sense, yet a bulk listing followed by bulk downloads is a pattern worth seeing.
Fields Each Record Needs
Event types matter little if the records are thin. OWASP groups useful attributes into when, where, who and what: timestamps and interaction identifiers, the application or host, the source address and user identity, and the event type and result. Translated to transfers, a solid record includes:
- A timestamp in UTC or with an explicit time zone, to the second or better
- A unique session or transfer identifier so related lines can be joined
- The authenticated identity and, for key-based access, a key fingerprint rather than the key
- Source and destination address, and the protocol or channel
- The object: path, file name, size and a checksum where the tool supports it
- The action and its result, with a short reason code on failure
- The server or node that handled the request, which matters in clustered setups
Prefer structured, machine-readable output such as key-value pairs or JSON over free-text lines. Structured logs are easier to search, to alert on and to hand to an auditor without a long explanation. Consistency matters as much as completeness: the same field should mean the same thing on every server.
What Should Never Appear in a Log
Logs are copied widely, kept for years and read by many people, which makes them a poor home for secrets. OWASP's list of data to exclude includes passwords, access tokens, encryption keys and other primary secrets, session identifiers, connection strings, payment card data and sensitive personal information, and it advises caution with file paths and internal network details.

Transfers add their own risks. File names can carry personal or commercial information, such as a customer name or a deal code. If a tool logs full paths, review a sample for sensitive naming before shipping logs to a shared platform. Never log file contents or previews. For failures, log the error class and a code, not a pasted payload.
A useful rule is to treat the log platform as less trusted than the transfer system. If a field would be a problem in a ticket that a dozen people can read, mask, hash or omit it. Also consider who can search the logs: a dashboard open to the whole support team can expose partner names and file names to people with no need to know.
Privacy law enters here too. If logs hold personal data, they deserve the same minimization and retention thinking as any other personal data. This is general information, not legal advice.
Logging in Practice: What an SFTP Server Records
Behavior varies by product, so check yours, but the OpenSSH SFTP subsystem shows the pattern. Its sftp-server program takes a log level option with values from QUIET and FATAL through ERROR, INFO, VERBOSE and several DEBUG levels, with ERROR as the default, and a facility option that defaults to AUTH. The manual states that INFO and VERBOSE log the transactions the server performs for the client (sftp-server manual).
The practical lesson is that the default may record very little about file activity. A server left at the default level can show errors yet say nothing about which files were fetched. Raising the level to capture transactions is a deliberate choice with a cost: more volume, and more sensitive file names in the output. Decide intentionally, test on a non-production server, and confirm what each level produces on your version.
The same applies to managed platforms. Check whether activity logging is on by default, whether administrative changes are logged as well as transfers, and whether the platform's own logs can be exported to your central system. The guide to hardening an SFTP server places logging among the other controls, and SFTP versus FTPS versus HTTPS explains why the protocol you choose affects what you can see.
Keeping Logs Trustworthy: Integrity and Access
A log that an attacker or an insider can edit is not evidence. OWASP's guidance includes building in tamper detection so modified or deleted records are revealed, copying log data to read-only media as soon as practical, recording and monitoring access to the logs themselves, and restricting and periodically reviewing read privileges. NIST's log management guide covers the wider discipline of building a log management infrastructure and running the processes around it (NIST SP 800-92).
- Ship logs off the transfer server quickly, so a compromise of that server does not erase the trail.
- Use separate accounts for log writers and log readers, each with minimal permissions.
- Restrict who can delete or alter logs, and alert when logging stops or volume drops sharply.
- Protect logs in transit with an encrypted channel such as syslog over TLS.
- Keep the long-term copy in write-once or versioned storage where your platform offers it.
Two practical points. First, silence is a signal: a quiet log on a busy server usually means something broke, so alert on the absence of events. Second, log access is itself an event worth recording. If someone exports six months of transfer history, you want to know who and why.
Separate duties where you can. The people who administer the transfer system should not be the only people able to alter its logs. In a small team that may simply mean logs are written to a system another person controls. The broader risk is covered in insider risk and file sharing.
Central Collection and Consistent Time
Transfer logs scattered across servers are slow to search and easy to lose. Collect them into one system where they can be queried together. OWASP recommends standard formats such as syslog over TLS for centralized collection and integrating application logs into existing log management systems. Joint guidance on event logging, developed by the Australian Signals Directorate's cyber security centre with partners including CISA, sets out a baseline for logging practices (CISA event logging guidance).

Time deserves its own attention. If servers disagree about the time, you cannot order events across systems, and a partner's receipt log will not line up with your send log. Synchronize clocks from a reliable source, use UTC or record the time zone, and agree a shared reference with your partners for multi-party flows.
Collection also gives you a place to normalize. Different tools call the same thing by different names: user, account, principal. Map them to one set of field names during ingestion so a single search covers every system. Do this before you need it; the middle of an incident is a poor time to learn that three platforms spell the same field three ways.
How Long to Keep Transfer Logs: A Decision Method
There is no single correct retention period, and anyone who quotes one without knowing your obligations is guessing. OWASP frames the principle: keep logs for the required retention period without destroying them early, and do not keep them beyond that period, with legal, regulatory and contractual obligations often setting the length. NIST SP 800-53 has audit and accountability controls on protecting audit information and on audit record retention, which treats retention as something an organization defines and enforces. A workable method:
- List the sources of obligation: sector regulations, customer contracts, insurance or audit requirements and internal policy.
- Note the longest period each source implies for transfer records, and whether records must be quickly retrievable for part of that time.
- Add an investigation window: how far back you realistically need to look to catch slow problems such as a credential used quietly for months.
- Choose tiers: a short period in fast, searchable storage and a longer period in cheaper archive storage.
- Record the decision, the owner and the review date, and automate deletion after the final period.
- Add a legal hold procedure so logs relevant to a dispute are preserved beyond the normal period.
Remember the other side of the coin. Keeping logs longer than needed raises cost and exposure, especially where logs contain personal data. A shorter period with a defensible rationale beats an indefinite one chosen out of caution. This is general information, not legal advice; check the requirements for your sector. For the wider disposal question, see how to write a cloud storage retention and deletion policy.
Review Routines That Catch Problems Early
Logs that nobody reads are an archive, not a control. A light, repeatable review catches most real problems. Match the frequency to the risk:
| Frequency | Check | What you are looking for |
|---|---|---|
| Daily or automated | Failed logins, lockouts, failed or missing scheduled jobs | Credential attacks and broken automations |
| Weekly | New accounts and keys, permission changes, unusual volume or timing | Unplanned changes and off-hours bulk movement |
| Monthly | Administrative changes, partner access list against current contracts, log pipeline health | Stale access and gaps in logging |
| Quarterly | Trace a sample of transfers end to end and test a restore of archived logs | Whether records are complete and retrievable |
Automate what machines do well: alert on repeated failures, on first-time source addresses for a partner and on a sudden spike in downloads. Keep human review for judgment calls. The external file sharing access audit shows how to run a periodic access review that pairs well with this routine.
A Hypothetical Audit Request, Step by Step
The following is a hypothetical scenario for illustration. A partner reports that a monthly data file arrived with missing rows and asks for proof of what was sent and when.
- Identify the transfer by job name and date, then pull the session identifier from the scheduler's log.
- Use that identifier to retrieve the transfer record: who authenticated, source and destination, file name, size, checksum and result.
- Compare the checksum and size with the partner's receipt record. A mismatch points to damage in transit; a match points to a problem in how the file was produced.
- Check the integrity events for a retry or a resumed transfer, which can explain odd file sizes.
- Look at administrative events around the time: was the job definition or the source path changed recently?
- Document the finding with the log excerpts, who retrieved them and when, and store the case alongside the logs so the evidence is preserved.
Notice what made this quick: an identifier that joined the records, a checksum in the log, and administrative events in the same system. Without those, the same question can take days and still end with an unconvincing answer.
Transfer Log Readiness Checklist
- Each transfer record answers who, what, when, where and with what result
- The logging level is set deliberately and tested, not left at the default
- Secrets, tokens, keys and file contents are excluded, and file names are reviewed
- Logs leave the transfer server quickly and are protected from edits
- Clocks are synchronized and time zones are consistent
- Alerts exist for logging stopped, repeated failures and unusual volume
- Retention period, owner and deletion process are written down
- A legal hold procedure exists
- Reviews are scheduled and a sample transfer is traced each quarter
If you can tick most of these, your logs will stand up to a partner dispute, an audit or an incident. If not, start with the first three: they cost little and deliver the most. The enterprise file sharing security checklist is a good companion for the surrounding controls.
Frequently Asked Questions
At minimum, record who authenticated, what file moved, when it happened, the source and destination, the protocol, and whether it succeeded. Add failed logins, permission denials, deletes and administrative changes. If a tool cannot provide even this set, treat that as a finding to fix or a reason to evaluate alternatives.
Sources and Further Reading
This guide draws on the pages below. Vendor documentation and standards change, so check the current version before relying on a detail.
- OWASP Logging Cheat Sheet (cheatsheetseries.owasp.org)
- NIST SP 800-92: Guide to Computer Security Log Management (csrc.nist.gov)
- OpenBSD manual: sftp-server logging options (man.openbsd.org)
- CISA: Best Practices for Event Logging and Threat Detection (cisa.gov)
Related Articles

About the Author: Mohamed Siraj
Mohamed is the founder of SecureTools.live. He leads the team in building secure, compliant, and privacy-first directory tooling for software teams, finance professionals, and enterprise security leaders worldwide.