Issue Bug Closed

#106748Editors cannot delete folders – getNearestRecyclerFolder throws InsufficientFolderAccessPermissionsException

Michael Neumann 05/22/25, 08:53 updated 12/02/25, 13:59

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_RECYCLER exists 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.

Expected Behavior:
  • 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 return null instead 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

History 911

  1. Jakub Zgirski commented <span data-processor="relativetime" data-value="2025-05-22T09:32:17+00:00" > 05/22/25, 09:32 </span>

    I confirm that behaviour. As addition, on T3 13.4.8 i didn’t had that issue.

  2. 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.

  3. Gerrit Code Review pushed patch set 3 for main to change 89681 status Accepted Under Review <span data-processor="relativetime" data-value="2025-06-10T12:24:13+00:00" > 06/10/25, 12:24 </span>

  4. Garvin Hicking commented and changed status Under Review Resolved done 0 % 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.