Repository navigation
Conversation
Reject recursive deletion before calling the backend when any configured path in the subtree lacks read and write permission. Resolve each configured subtree path independently and intersect effective permissions so sibling grants cannot mask restrictions. Preserve inherited permissions and subject precedence for delete, move, and copy checks. Add resolver, operation-boundary, and local filesystem regression coverage, and document recursive permission requirements in English and Chinese. Co-Authored-By: codex <codex@openai.com>
Centralize read-only destination selection for save, upload, copy, and move. Authorize the final virtual path and missing parents through permission, mount, listener, and chroot wrappers before storage changes. Execution now uses exact destinations: non-overwrite conflicts fail instead of renaming. Keep automatic naming at file-manager and initial-upload entry points, and retain the selected path for upload callbacks. Make WebDAV transfers use whole drive operations so rejected moves preserve existing destinations and recursive copies cannot silently omit unreadable descendants. Preserve Depth: 0 source semantics and check replaced destination subtrees. Align fallback directory replacement and native conflict reporting, add real filesystem/HTTP regressions, and document the execution contract. Existing internal callers needing automatic names must prepare them first; preparation does not reserve names or provide cross-backend transactions. Co-Authored-By: codex <codex@openai.com>
Delegate overwrite moves to the advertised posix-rename@openssh.com version 1 extension. Reject overwrite mode when it is unavailable, even for a missing destination, and return extension errors without deleting or staging files. This avoids source loss through aliased paths and exposing protected source data through temporary names. Keep ordinary rename for non-overwrite moves so existing destinations cannot be replaced through POSIX rename. Add protocol and Windows regressions, run SFTP tests in platform CI, and document the compatibility restriction with localized errors. Co-Authored-By: codex <codex@openai.com>
devld
force-pushed
the
fix/recursive-path-permissions
branch
from
October 20, 2026 09:21
f69fe48 to
92a038a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recursive deletion could remove protected descendants, and write operations could select a different destination after permission checks. This change checks recursive permissions correctly and authorizes the final virtual write target before storage changes.
PrepareWritedestination selection shared by save, upload, copy, and move. Check final-path and missing-parent permissions while preserving mount and chroot namespaces.Depth: 0checks the source directory itself and any destination subtree being replaced.Compatibility: direct execution callers requiring automatic naming must call preparation first. Non-overwrite conflicts are errors rather than skipped entries or implicit renames. Directory-copy overwrite fallback replaces the target rather than merging stale contents. Preparation does not reserve names; atomic conflict handling remains backend-dependent, and storage failures/cancellation do not gain transactional rollback.
Validation:
go test ./...passed with localhost binding permitted for HTTP integration tests.go test -race ./drive ./drive/fs ./server/webdav ./common/driveutilpassed.docs/site;git diff --checkpassed.