Repository navigation
MCH v0.2.1
Mighty Copy with Hash v0.2.1
This is a security and reliability maintenance release for the Rust command-line copy/move utility MCH. It replaces v0.2.0; no new user-facing command-line modes are introduced.
Security and reliability fixes
- Prevent a second writer from silently replacing a destination created after the initial no-overwrite check. Linux/Android use atomic RENAME_NOREPLACE; other platforms use a safe no-replace hard-link approach or refuse unsupported publication.
- Keep the owner-private staging file handle open during copying instead of reopening its path; publish and then restore the source file permissions.
- Sync staging data before explicit destructive overwrites and sync published metadata/destination directories on Unix, including --resume --overwrite without --move.
- Retry interrupted system reads and move the large progress buffer off worker stacks.
- Add race-condition and resume-overwrite regression tests.
Verification
- Private source commit: 23b4b5b63015262cf947e6d4eb4d652853bd221c.
- Release branch commit: e8022cf; only the 13-file public allowlist was carried over.
- Final public main commit: 88ee11b.
- GitHub Actions checks and optimized builds passed on Linux, Windows and macOS (both on the PR and merged main).
- Termux and Fedora vm01 checks passed, including 13 unit tests, 49 integration tests, 12 private release-guard tests, independent SHA-256 copying/moving checks, actual SIGKILL/resume and overwrite refusal.
Install from source
Download the source archive below or clone the public repository, then run:
cargo build --release --locked
The executable is target/release/mch (Windows: mch.exe). Ready-to-use native binaries are now available in the Assets section as Windows x86_64 ZIP, Apple Silicon macOS AArch64 TAR.GZ and Linux x86_64 TAR.GZ. The exact release source is provided as both ZIP and TAR.GZ. Use SHA256SUMS.txt to verify downloads. Windows binaries are unsigned; macOS binaries are neither Apple-notarized nor developer-signed.
Safety limitations
MCH is not a transactional backup or universally crash-proof data store. Integrity verification normally uses the operating-system page cache; storage controllers and filesystems may still lose data on power failure. Hostile parent-path races and multi-file transaction rollback are not fully supported. The Unix --resume mode applies to a single regular file only; Windows, directories and multi-file resume are intentionally unsupported. Use independent backups before destructive moves. Refer to the README and specification for details.