#106748Editors cannot delete folders – getNearestRecyclerFolder throws InsufficientFolderAccessPermissionsException
Description
Editors (non-admin users) are unable to delete folders via the Filelist module if the parent folder is not accessible due to permission restrictions.
The method\TYPO3\CMS\Core\Resource\ResourceStorage::getNearestRecyclerFolder() throws an InsufficientFolderAccessPermissionsException when:
- No folder with the role
FolderInterface::ROLE_RECYCLERexists in the accessible hierarchy or - The parent folder (e.g.,
fileadmin/) is not accessible due to user permissions.
fileadmin [no access]
└── folder1 [file mount]
├── _recycler_
└── folder-to-delete
In this scenario, folder-to-delete cannot be deleted because the method fails to resolve a valid recycler folder due to restricted access to fileadmin.
- Deletion should work as long as a
_recycler_folder exists within the accessible tree, and the user has permissions to use it. - Alternatively: If no
_recycler_folder exists or is accessible, the method should returnnullinstead of throwing an exception.
*Actual Behavior:*
The method getNearestRecyclerFolder() throws an InsufficientFolderAccessPermissionsException, preventing the folder from being deleted.
*Possible Fix:*
Catch and suppress InsufficientFolderAccessPermissionsException during traversal.
Reviews 3
Related issues 2
History 911
-
Garvin Hicking changed Related to #96863 <span data-processor="relativetime" data-value="2025-05-22T20:32:28+00:00" > 05/22/25, 20:32 </span>
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-05-22T20:32:47+00:00" > 05/22/25, 20:32 </span>
I believe this was caused by:
-
Garvin Hicking changed status
NewAccepted Is Regression 1 <span data-processor="relativetime" data-value="2025-05-23T06:12:34+00:00" > 05/23/25, 06:12 </span> -
Friedemann Altrock commented <span data-processor="relativetime" data-value="2025-06-10T11:32:55+00:00" > 06/10/25, 11:32 </span>
Could reproduce.
Interestingly, this does work for deleting files. Why? Because the `deleteFile` method disables the permission checks, so the move can succeed.
-
Friedemann Altrock changed Related to #106838 <span data-processor="relativetime" data-value="2025-06-10T11:43:21+00:00" > 06/10/25, 11:43 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 89681 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2025-06-10T12:24:13+00:00" > 06/10/25, 12:24 </span> -
Gerrit Code Review pushed patch set 1 for 13.4 to change 89811 <span data-processor="relativetime" data-value="2025-06-23T16:30:39+00:00" > 06/23/25, 16:30 </span>
-
Garvin Hicking commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-06-23T16:55:08+00:00" > 06/23/25, 16:55 </span>Applied in changeset commit:061ee3f2055d2f076c45c3a1e1691f5fd46f3978.
-
Garvin Hicking changed Duplicated by #107004 <span data-processor="relativetime" data-value="2025-06-30T06:16:20+00:00" > 06/30/25, 06:16 </span>
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T13:59:09+00:00" > 12/02/25, 13:59 </span>
I confirm that behaviour. As addition, on T3 13.4.8 i didn’t had that issue.