[UDFS] Fix access denied when SetRenameInformationFile is called on a directory/file#344
Draft
Copilot wants to merge 5 commits into
Draft
[UDFS] Fix access denied when SetRenameInformationFile is called on a directory/file#344Copilot wants to merge 5 commits into
Copilot wants to merge 5 commits into
Conversation
…directory/file Windows Explorer moves items to the Recycle Bin via SetRenameInformation, while cmd.exe uses SetDispositionInformation directly. Two overly-strict guards in UDFSetRenameInfo were blocking the rename path: 1. Fcb->FcbCleanup > 1 — rejected rename when more than one handle was open (e.g. Explorer had the directory open for browsing on one handle and opened a second handle for the rename). Sharing violations are already enforced by IoCheckShareAccess inside UDFCheckAccessRights, so this extra check was redundant and incorrect. 2. UDFCheckDirOpenHandles — rejected rename of any directory whose subtree contained files with FcbCleanup != 0 (e.g. Explorer opened files inside for thumbnail or metadata generation). UDF addresses files by physical ICB location, so moving a directory only changes the parent FileIdentifier entry and cannot invalidate open handles to files inside. NTFS allows the same. Remove both checks and the now-unused UDFCheckDirOpenHandles helper function. Agent-Logs-Url: https://github.com/Zero3K20/reactos/sessions/4133b9c9-c6da-4d1e-9c9f-8b862376aa62 Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix access denied result for SetRenameInformationFile
[UDFS] Fix access denied when SetRenameInformationFile is called on a directory/file
May 1, 2026
4 tasks
Copilot AI
added a commit
that referenced
this pull request
May 1, 2026
…ies/files Agent-Logs-Url: https://github.com/Zero3K20/reactos/sessions/9fd63780-7517-4780-8b0c-c3cf1175ac3c Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com>
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.
Windows Explorer deletes items by moving them to the Recycle Bin via
SetRenameInformation, whilecmd.exe rdusesSetDispositionInformation. Two overly-strict guards inUDFSetRenameInfowere returningSTATUS_ACCESS_DENIEDon the rename path, surfacing in Explorer as "You need permission from Everyone to make changes to this folder."Removed:
Fcb->FcbCleanup > 1guardRejected rename whenever more than one handle was open — e.g. Explorer browsing the directory on one handle while opening a second for the rename. Share-access violations are already enforced by
IoCheckShareAccessinUDFCheckAccessRights.Removed:
UDFCheckDirOpenHandlesand its callRejected rename of any directory whose subtree contained files with
FcbCleanup != 0— e.g. Explorer had opened files inside for thumbnail/metadata generation. UDF addresses files by physical ICB location; renaming a directory only changes the parent's FileIdentifier entry and cannot invalidate open handles to files inside. NTFS permits the same operation without restriction.UDFCheckDirOpenHandleshad no other callers and has been removed entirely along with itsprotos.hdeclaration.