Skip to content

fix(desktop): allow FUSE rename on SMB backend#174

Merged
FSM1 merged 2 commits into
mainfrom
fix/fuse-rename-smb
Feb 21, 2026
Merged

fix(desktop): allow FUSE rename on SMB backend#174
FSM1 merged 2 commits into
mainfrom
fix/fuse-rename-smb

Conversation

@FSM1

@FSM1 FSM1 commented Feb 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Simplify access() to always grant if the inode exists — POSIX permission checks add no security value in a single-user encrypted vault and break the FUSE-T SMB backend (proxied UID mismatch causes EACCES on access(W_OK), blocking rename)
  • Unify UID/GID assignment in create() and mkdir() to use getuid()/getgid() instead of req.uid()/req.gid(), matching root inode and populate_folder() patterns
  • Update desktop CLAUDE.md known limitations to reflect fix

Test plan

  • echo "test" > ~/CipherBox/testfile.txt — create file
  • mv ~/CipherBox/testfile.txt ~/CipherBox/renamed.txt — same-dir rename
  • mkdir ~/CipherBox/sub && mv ~/CipherBox/renamed.txt ~/CipherBox/sub/ — cross-folder move
  • Verified content integrity after each operation
  • cargo check --features fuse — no new warnings

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Fixed rename operation failures on macOS with SMB backend
    • Improved access control handling for FUSE file operations
  • Documentation

    • Added documentation for known limitation: Stale mount behavior after application crash and recommended recovery steps

FSM1 and others added 2 commits February 21, 2026 01:50
Moved to done/, beginning investigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 01485d538f55
The macOS SMB client calls access(W_OK) before rename. Our strict
UID + permission-bit check returned EACCES because FUSE-T's SMB server
proxies requests under a different UID than the mounting user. Since
CipherBox is a single-user encrypted vault (encryption IS the access
control), simplify access() to always grant if the inode exists.

Also unify UID/GID assignment in create() and mkdir() to use
getuid()/getgid() instead of req.uid()/req.gid(), matching the root
inode and populate_folder patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 92e5c6093780
@coderabbitai

coderabbitai Bot commented Feb 21, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉


Walkthrough

Planning documentation updated to mark a FUSE rename issue on SMB backend as fixed. FUSE operations code modified to derive UID/GID from process context instead of request context, and access permission checks changed to permissive validation. Desktop documentation updated to reflect the fix and document new known limitations.

Changes

Cohort / File(s) Summary
Planning & Documentation
.planning/STATE.md, apps/desktop/CLAUDE.md
Updated pending todos count from 6 to 5, removed completed FUSE rename fix item. Documented SMB rename issue as resolved; added "Stale mount after crash" as new known limitation.
FUSE Operations
apps/desktop/src-tauri/src/fuse/operations.rs
Changed UID/GID derivation in file creation operations from request context to process context via libc::getuid()/libc::getgid(). Modified access permission checks from owner-based POSIX enforcement to permissive existence validation. Marked unused request parameters with underscore prefix.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: fixing FUSE rename functionality on the SMB backend by simplifying access checks and unifying UID/GID assignment.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/fuse-rename-smb

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@FSM1 FSM1 self-assigned this Feb 21, 2026
@FSM1 FSM1 merged commit 049ac7b into main Feb 21, 2026
9 checks passed
@FSM1 FSM1 deleted the fix/fuse-rename-smb branch February 21, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant