Access forbidden when creating some subfolders (when pasting a new but not empty folder)

Nextcloud version : 27.1.3.1
Operating system and version : debian 12 (Bookworm)
Apache or nginx version : 2.4.57
PHP version : 8.2.7
MySql : MariaDb 10.11.4
desktop client (windows 10) : 3.10.1

I have recently installed (from scratch) the “latest” release 27 of nextcloud.

When I try to put back folders I have saved from the old nextcloud (release 23 ?), for some of them, I have an error message saying “access forbidden see the logs”.
The files at the root of the folder are synchronised but not the subfolders.
If I create manually the folder, the problem goes one step down : the file at the root are synced, but I have the error message for each subfolder.

Is this the first time you’ve seen this error? (Y/N): Y but happens on several sub folders.

The output of your Nextcloud log in Admin > Logging: nothing

The output of your Nextcloud log in debug archive on the desktop :

2023-11-02 14:43:37:023 [ info nextcloud.sync.engine C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\syncengine.cpp:774 ]:	#### Discovery end ####################################################  12541 ms
2023-11-02 14:43:37:024 [ info nextcloud.gui.activity C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\tray\activitylistmodel.cpp:656 ]:	Activity/Notification/Error successfully dismissed:  "Accès refusé."
2023-11-02 14:43:37:024 [ info nextcloud.gui.activity C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\tray\activitylistmodel.cpp:657 ]:	Trying to remove Activity/Notification/Error from view... 
2023-11-02 14:43:37:024 [ info nextcloud.gui.activity C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\tray\activitylistmodel.cpp:661 ]:	Activity/Notification/Error successfully removed from the list.
2023-11-02 14:43:37:024 [ info nextcloud.gui.activity C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\tray\activitylistmodel.cpp:662 ]:	Updating Activity/Notification/Error view.
2023-11-02 14:43:37:024 [ info nextcloud.sync.engine C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\syncengine.cpp:824 ]:	#### Reconcile (aboutToPropagate) ####################################################  12541 ms
2023-11-02 14:43:37:024 [ info nextcloud.sync.statustracker C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\syncfilestatustracker.cpp:229 ]:	Investigating "Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T" OCC::SyncFileItem::NoStatus CSyncEnums::CSYNC_INSTRUCTION_TYPE_CHANGE OCC::SyncFileItem::Up
2023-11-02 14:43:37:025 [ info nextcloud.sync.engine C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\syncengine.cpp:831 ]:	#### Reconcile (aboutToPropagate OK) ####################################################  12542 ms
2023-11-02 14:43:37:025 [ info nextcloud.sync.engine C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\syncengine.cpp:885 ]:	#### Post-Reconcile end ####################################################  12543 ms
2023-11-02 14:43:37:042 [ info nextcloud.gui.folder C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\folder.cpp:1150 ]:	#### Propagation start ####################################################
2023-11-02 14:43:37:043 [ info nextcloud.gui.application C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\owncloudgui.cpp:233 ]:	Sync state changed for folder  "https://chaudron-nautique.ddns.net/remote.php/dav/files/vanvan/" :  "Sync running"
2023-11-02 14:43:37:047 [ info nextcloud.sync.propagator.root.directory C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\owncloudpropagator.cpp:1457 ]:	scheduleSelfOrChild OCC::PropagatorJob::NotYetStarted pending uploads 0 subjobs state OCC::PropagatorJob::NotYetStarted
2023-11-02 14:43:37:064 [ info nextcloud.sync.propagator.root.directory C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\owncloudpropagator.cpp:1481 ]:	OCC::SyncFileItem::Success slotSubJobsFinished OCC::PropagatorJob::Running pending uploads 0 subjobs state OCC::PropagatorJob::Finished
2023-11-02 14:43:37:067 [ info nextcloud.sync.propagator.root.directory C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\owncloudpropagator.cpp:1457 ]:	scheduleSelfOrChild OCC::PropagatorJob::Running pending uploads 0 subjobs state OCC::PropagatorJob::Finished
2023-11-02 14:43:37:067 [ info nextcloud.sync.propagator C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\owncloudpropagator.h:216 ]:	Starting CSyncEnums::CSYNC_INSTRUCTION_TYPE_CHANGE propagation of "Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T" by OCC::PropagateUploadFileV1(0x2022b2b13a0)
2023-11-02 14:43:37:067 [ debug default C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\propagateupload.cpp:288 ]	[ OCC::PropagateUploadFileCommon::startUploadFile ]:	Deleting the current
2023-11-02 14:43:37:067 [ info nextcloud.sync.accessmanager C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\accessmanager.cpp:78 ]:	5 "" "https://chaudron-nautique.ddns.net/remote.php/dav/files/vanvan/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T" has X-Request-ID "4e9a0bb3-27c6-4144-8ad2-48f9e246d515"
2023-11-02 14:43:37:067 [ info nextcloud.sync.networkjob C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\abstractnetworkjob.cpp:363 ]:	OCC::DeleteJob created for "https://chaudron-nautique.ddns.net" + "/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T" "OCC::PropagateUploadFileV1"
2023-11-02 14:43:37:086 [ info nextcloud.sync.propagator.root.directory C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\owncloudpropagator.cpp:1457 ]:	scheduleSelfOrChild OCC::PropagatorJob::Running pending uploads 0 subjobs state OCC::PropagatorJob::Finished
2023-11-02 14:43:37:254 [ info nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\creds\webflowcredentials.cpp:406 ]:	request finished
2023-11-02 14:43:37:254 [ warning nextcloud.sync.networkjob C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\abstractnetworkjob.cpp:221 ]:	QNetworkReply::ContentNotFoundError "Le serveur a répondu \"404 Not Found\"  à \"DELETE https://chaudron-nautique.ddns.net/remote.php/dav/files/vanvan/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T\"" QVariant(int, 404)
2023-11-02 14:43:37:254 [ warning nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\creds\webflowcredentials.cpp:208 ]:	QNetworkReply::ContentNotFoundError
2023-11-02 14:43:37:254 [ warning nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\creds\webflowcredentials.cpp:209 ]:	"Error transferring https://chaudron-nautique.ddns.net/remote.php/dav/files/vanvan/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T - server replied: Not Found"
2023-11-02 14:43:37:254 [ info nextcloud.sync.networkjob.simplefilejob C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\networkjobs.cpp:1185 ]:	"DELETE" for QUrl("https://chaudron-nautique.ddns.net/remote.php/dav/files/vanvan/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T") FINISHED WITH STATUS "ContentNotFoundError Le serveur a répondu \"404 Not Found\"  à \"DELETE https://chaudron-nautique.ddns.net/remote.php/dav/files/vanvan/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T\""
2023-11-02 14:43:37:254 [ debug default C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\propagateupload.cpp:300 ]	[ OCC::PropagateUploadFileCommon::slotComputeContentChecksum ]:	Trying to compute the checksum of the file
2023-11-02 14:43:37:254 [ debug default C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\propagateupload.cpp:301 ]	[ OCC::PropagateUploadFileCommon::slotComputeContentChecksum ]:	Still trying to understand if this is the local file or the uploaded one
2023-11-02 14:43:37:254 [ info nextcloud.sync.checksums C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\common\checksums.cpp:189 ]:	Computing "SHA1" checksum of "D:/Nextcloud/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T" in a thread
2023-11-02 14:43:37:254 [ warning nextcloud.common.checksumcalculator C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\common\checksumcalculator.cpp:91 ]:	Could not open file "D:/Nextcloud/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T" for reading to compute a checksum "Accès refusé."
2023-11-02 14:43:37:271 [ info nextcloud.sync.checksums C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\common\checksums.cpp:189 ]:	Computing "SHA1" checksum of "D:/Nextcloud/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T" in a thread
2023-11-02 14:43:37:271 [ warning nextcloud.common.checksumcalculator C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\common\checksumcalculator.cpp:91 ]:	Could not open file "D:/Nextcloud/Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T" for reading to compute a checksum "Accès refusé."
2023-11-02 14:43:37:272 [ warning nextcloud.sync.propagator.upload.v1 C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\propagateuploadv1.cpp:141 ]:	Could not prepare upload device:  "Accès refusé."
2023-11-02 14:43:37:272 [ warning nextcloud.sync.propagator C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\owncloudpropagator.cpp:284 ]:	Could not complete propagation of "Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T" by OCC::PropagateUploadFileV1(0x2022b2b13a0) with status OCC::SyncFileItem::SoftError and error: "Accès refusé."
2023-11-02 14:43:37:272 [ warning nextcloud.gui.activity C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\tray\usermodel.cpp:873 ]:	Item  "Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T"  retrieved resulted in  "Accès refusé."
2023-11-02 14:43:37:272 [ warning nextcloud.gui.activity C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\tray\usermodel.cpp:835 ]:	Item  "Le Chaudron Nautique/Chantiers/Chantiers ouverts/C1246 - Laita - support cuve 1T"  retrieved resulted in error  "Accès refusé."
2023-11-02 14:43:37:272 [ info nextcloud.sync.propagator C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\owncloudpropagator.cpp:1536 ]:	PropagateRootDirectory::slotDirDeletionJobsFinished emit finished OCC::SyncFileItem::SoftError
2023-11-02 14:43:37:273 [ info nextcloud.sync.engine C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\syncengine.cpp:980 ]:	Sync run took  12790 ms
2023-11-02 14:43:37:273 [ info nextcloud.gui.folder C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\folder.cpp:1157 ]:	Client version 3.10.1stable-Win64 (build 20231025)  Qt 5.15.10  SSL  OpenSSL 3.1.3 19 Sep 2023
2023-11-02 14:43:37:273 [ info nextcloud.gui.folder C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\folder.cpp:1166 ]:	SyncEngine finished without problem.
2023-11-02 14:43:37:282 [ info nextcloud.gui.folder C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\folder.cpp:411 ]:	Folder "" sync result:  OCC::SyncResult::SyncRunning
2023-11-02 14:43:37:284 [ info nextcloud.gui.application C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\owncloudgui.cpp:233 ]:	Sync state changed for folder  "https://chaudron-nautique.ddns.net/remote.php/dav/files/vanvan/" :  "Success, some files were ignored."

It doesn’t seem to be linked with the length of the name, but I can’t find where it comes from.

Can you do the same operation via the Web UI without any problem?

this issue looks a lot like my issue, plz confirm:

That’s what I did, and it worked. But to make sure I had no loss I did it in ‘small’ packets of files. Quite time consuming…