Take ownership & fix drive permissions for Windows.
English | ภาษาไทย
A lightweight Windows utility that fixes NTFS file permission issues when moving hard drives (HDD/SSD) between PCs. Resolves "Access Denied" errors, read-only Excel files, and blocked files caused by SID mismatch, missing ACL entries, and Zone Identifier (Mark of the Web). Built with Tauri v2 (Rust + HTML/CSS/JS).
Common searches this solves: take ownership of files, fix drive permissions, access denied after moving hard drive, Excel protected view after drive swap, NTFS permission fix tool, reset file ownership Windows, icacls recursive fix, remove mark of the web, unblock files from another computer
When you physically move a hard drive (HDD/SSD) from one Windows PC to another, you'll often run into these problems:
- "Access Denied" when opening or saving files
- Excel opens in read-only / Protected View and won't let you edit
- Files are "blocked" — Windows marks them as coming from another computer
- Can't delete or rename files you used to own
This happens because Windows NTFS stores file ownership and permissions tied to specific user accounts (SIDs). When the drive moves to a new PC, the new user account doesn't match the old one — so Windows denies access.
| Cause | Technical detail | Symptom |
|---|---|---|
| SID mismatch | Files owned by old PC's user SID | New PC can't write — "Access Denied" |
| Missing ACL entry | New user not in file's access control list | No read/write permission |
| Read-only attribute | File flagged as read-only | Can open but can't save changes |
| Zone Identifier (MOTW) | Alternate data stream marks file as "from another computer" | Windows/Excel blocks the file |
Applies 4 fix steps automatically to every affected file:
| Step | Command | What it does |
|---|---|---|
| 1. Take ownership | takeown |
Transfers file ownership from old user to you |
| 2. Grant full access | icacls /c |
Adds full-control permission for Administrators + your user account. Uses /c flag to continue past errors |
| 3. Remove read-only | attrib -R |
Clears the read-only attribute |
| 4. Unblock files | Delete :Zone.Identifier |
Removes the alternate data stream that marks files as blocked |
| Mode | How it works | Pros | Cons |
|---|---|---|---|
| Quick Fix | Runs takeown /r, icacls /t /c, attrib /S /D recursively on entire drives. Then batch-unblocks via PowerShell. |
Fastest — Windows handles recursion natively | No per-file report |
| Scan & Fix | Walks every file with native Rust checks to detect issues (read-only, blocked, access denied), then fixes only problem files individually | Full report — grouped by cause and file type | Slower because it scans everything first |
| Fix Specific Folder | Same scan & fix logic but scoped to a single folder | Full report + much faster than full drive | Only fixes the selected folder |
The bottleneck is always disk I/O (reading/writing file permissions), not the program itself. The app uses near-zero CPU.
| Factor | Impact | Why |
|---|---|---|
| Number of files | 1K = seconds, 100K = minutes, 1M+ = 10+ min | Each file needs permission read/write on disk |
| Disk type | SSD is 3-5x faster than HDD | Permission changes are random I/O |
| Antivirus | Can slow 2-3x | AV scans every permission change |
| Other disk activity | Concurrent access slows it down | Shared disk bandwidth |
Estimated times for 100,000 files:
| Mode | SSD | HDD | Report |
|---|---|---|---|
| Quick Fix | ~1-3 min | ~5-10 min | None |
| Fix Specific Folder (1K files) | ~5-15 sec | ~15-30 sec | Full |
| Scan & Fix (full drive) | ~3-8 min | ~10-20 min | Full |
Issue detection uses native Rust file system checks (microseconds per file) instead of spawning PowerShell per file, which would add ~300ms overhead each.
- 3 fix modes — Quick Fix, Scan & Fix, Fix Specific Folder
- Dark / Light theme — toggle in title bar
- English / Thai — toggle in title bar
- Real-time progress — live stats (scanned / issues / fixed / failed) with progress bar
- Summary report — issues grouped by cause and fixed files grouped by extension
- Export log — save results to text file
- Auto-elevate — runs as Administrator automatically (UAC prompt)
- Help overlay — built-in documentation with mode comparison and performance info
- Single .exe — no installation, no dependencies, no runtime needed
Go to Releases and download the latest .exe.
Requires Windows 10 (version 1803+) or Windows 11. NTFS formatted drives only.
| Windows Version | Status | Note |
|---|---|---|
| Windows 11 | Supported | Works out of the box |
| Windows 10 (1803+) | Supported | May auto-install WebView2 on first run |
| Windows 10 (pre-1803) | Not supported | Requires Tauri v2 minimum |
| Windows 8.1 / 8 / 7 | Not supported | — |
If Excel still shows Protected View after running this tool, that's a separate Excel-level setting:
File → Options → Trust Center → Trust Center Settings → Protected View → uncheck all 3 options
This tool fixes Windows file permissions. Excel Trust Center is an independent security layer.
npm install
npm run tauri devOn macOS/Linux, the app runs with mock data (simulated drives) for UI development. All Windows-specific code compiles behind #[cfg(target_os = "windows")] with mock fallbacks.
npm run tauri buildOutput: src-tauri/target/release/TakeDriveOwnership.exe
Automated builds run via GitHub Actions on tag push (see .github/workflows/build.yml).
src/ Frontend (HTML/CSS/JS, no framework)
index.html UI layout, custom frameless title bar
style.css Dark/Light theme via CSS variables
app.js Tauri IPC, drive rendering, fix logic
i18n.js EN/TH translations + help content
theme.js Theme toggle
src-tauri/ Backend (Rust)
src/
main.rs Entry point
lib.rs Tauri plugin + command registration
commands/
drives.rs Drive detection (PowerShell on Windows, mock on macOS)
fix.rs Fix operations — 3 modes with progress streaming
Key design decisions:
- Native Rust file checks instead of PowerShell for issue detection (~30,000x faster)
icacls /cflag to continue past individual file errors- Directories in scan mode don't use
/r /tto avoid redundant re-fixing of child items - Progress events streamed via
app.emit()for real-time UI updates without polling CREATE_NO_WINDOWflag on all subprocess calls to prevent console flashing
Issues and pull requests welcome. Please test on actual Windows hardware with real moved drives when possible — mock mode on macOS can only validate UI behavior.
This software is free and open source. You may use, modify, and redistribute it under the terms of the GNU General Public License v3.0. Any derivative work must also be open source under the same license.
If this tool saved you time, consider buying me a coffee.