Cannot transfer files and folders to a Plone 5.2.4 site

Hello everyone,

For days, I would say even weeks, I have been struggling to find a solution to access Plone via WebDAV.
More precisely, I would say that I cannot transfer files and folders to a plone site (locally) via WebDav, regardless of the WebDAV client used: CyberDuck, WinSCP, RaiDrive etc.
Thanks to the help in the community, WebDav is well enabled for support in Zope.
The configuration in waitress and Zope.conf is successful.
Despite all this, when trying to transfer, I invariably got the message:
"error while transferring file ..... 404 Not Found".
I gave all possible and imaginable permissions on the folders to the affected Windows, Zope and Plone users: but to no avail.

My questions:

  1. Has anyone managed to transfer folder and file to plone 5.2.4 via WebDAV on Windows?

  2. More generally, could I have missed a step in the approach?

Thank you in advance for your help.

I do not use Windows.

To get more hints regarding the problem, you may reconfigure your error_log objects (in the portal and the root) not to ignore exceptions. Then reproduce the problem and look for the detailed corresponding error information in one of the error_logs (likely the on in the portal, but maybe the root's one).

Thank you very much @dieter.
I will hasten to implement your advice and come back with the result.

Actually, the "error_log" objects were configured the way you want them to be.
So I was able to recover the contents of the file you have below.
Thank you again @dieter for your help.

"Exception traceback

Time 2021/06/23 15:05:32.852954 GMT+2
User Name (User Id) username (username)
Request URL http://127.0.0.1:8080/Plone_test2/manage_addProduct/CMFDynamicViewFTI/addDynFolder
Exception Type LocationError
Exception Value zope.location.interfaces.LocationError: (<App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460>, 'colophon')

  • Expression: "python:path(path_expression)" - Filename: ... s-4.4.6-py3.8.egg\plone\app\portlets\portlets\classic.pt - Location: (line 9: col 32) - Source: ... replace="structure python:path(path_expression)" /> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Arguments: template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x000001D3C2C61C40>
    options: {} args: () nothing: None modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x000001D3BF11E040> request: <WSGIRequest, URL=http://127.0.0.1:8080/Plone_test2/manage_addProduct/CMFDynamicViewFTI/addDynFolder> view: <plone.app.portlets.portlets.classic.Renderer object at 0x000001D3C6D21250> context: <App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460> views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x000001D3C6D06E50> here: <App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460> container: <App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460> root: traverse_subpath: user: <PropertiedUser 'undy'> default: repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x000001D3C318F940> loop: {} target_language: None translate: <function BaseTemplate.render..translate at 0x000001D3C6CF3A60> attrs: {} use_macro: False path_expression: 'context/colophon'
    Traceback (innermost last):

    Module plone.app.portlets.manager, line 54, in safe_render
    Module Products.Five.browser.pagetemplatefile, line 126, in call
    Module Products.Five.browser.pagetemplatefile, line 58, in call
    Module zope.pagetemplate.pagetemplate, line 133, in pt_render
    Module Products.PageTemplates.engine, line 378, in call
    Module z3c.pt.pagetemplate, line 176, in render
    Module chameleon.zpt.template, line 302, in render
    Module chameleon.template, line 214, in render
    Module chameleon.utils, line 53, in raise_with_traceback
    Module chameleon.template, line 192, in render
    Module 6f36449b16fc7caf7d401a5e245f5193, line 192, in render
    Module zope.tales.pythonexpr, line 73, in call
    traceback_info: (path(path_expression))
    Module , line 1, in
    Module zope.tales.pythonexpr, line 90, in call
    Module zope.tales.expressions, line 250, in call
    Module Products.PageTemplates.Expressions, line 188, in _eval
    Module zope.tales.expressions, line 153, in _eval
    Module Products.PageTemplates.Expressions, line 104, in trustedBoboAwareZopeTraverse
    Module zope.traversing.adapters, line 156, in traversePathElement
    traceback_info: (<App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460>, 'colophon')
    Module zope.traversing.adapters, line 61, in traverse
    traceback_info: (<App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460>, 'colophon', )

zope.location.interfaces.LocationError: zope.location.interfaces.LocationError: (<App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460>, 'colophon')

  • Expression: "python:path(path_expression)"
  • Filename: ... s-4.4.6-py3.8.egg\plone\app\portlets\portlets\classic.pt
  • Location: (line 9: col 32)
  • Source: ... replace="structure python:path(path_expression)" />
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • Arguments: template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x000001D3C2C61C40> options: {} args: () nothing: None modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x000001D3BF11E040> request: <WSGIRequest, URL=http://127.0.0.1:8080/Plone_test2/manage_addProduct/CMFDynamicViewFTI/addDynFolder> view: <plone.app.portlets.portlets.classic.Renderer object at 0x000001D3C6D21250> context: <App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460> views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x000001D3C6D06E50> here: <App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460> container: <App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460> root: traverse_subpath: user: <PropertiedUser 'undy'> default: repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x000001D3C318F940> loop: {} target_language: None translate: <function BaseTemplate.render..translate at 0x000001D3C6CF3A60> attrs: {} use_macro: False path_expression: 'context/colophon'

REQUEST
form
cookies
plone-toolbar '{"expanded":true}'
tree-s 'eJyLjlZyhANXWyUdhWiEiJ-fo61SLBAAALtPCeM'
lazy items
SESSION <bound method SessionDataManager.getSessionData of <SessionDataManager at /session_data_manager>>
<>>>>
other

SERVER_URL 'http://127.0.0.1:8080'
URL 'http://127.0.0.1:8080/Plone_test2/manage_addProduct/CMFDynamicViewFTI/addDynFolder'
method 'GET'
TraversalRequestNameStack
ACTUAL_URL 'http://127.0.0.1:8080/Plone_test2/manage_addProduct/CMFDynamicViewFTI/addDynFolder'
LANGUAGE_TOOL <plone.i18n.utility.LanguageBinding object at 0x000001D3C6C543A0>
LANGUAGE 'fr'
PUBLISHED <bound method addDynFolder of <App.ProductContext.ProductContext.registerClass..FactoryDispatcher object at 0x000001D3C2D21460>>
AUTHENTICATED_USER <PropertiedUser 'undy'>
AUTHENTICATION_PATH ''
disable_border True
disable_plone.leftcolumn True
disable_plone.rightcolumn True
_plone_ec_cache {2009012644736: <Products.PageTemplates.Expressions.ZopeContext object at 0x000001D3C6D09BE0>}
catalog_cache <WeakKeyDictionary at 0x1d3c6d210d0>
URL0 http://127.0.0.1:8080/Plone_test2/manage_addProduct/CMFDynamicViewFTI/addDynFolder
URL1 http://127.0.0.1:8080/Plone_test2/manage_addProduct/CMFDynamicViewFTI
URL2 http://127.0.0.1:8080/Plone_test2/manage_addProduct
URL3 http://127.0.0.1:8080/Plone_test2
URL4 http://127.0.0.1:8080
BASE0 http://127.0.0.1:8080
BASE1 http://127.0.0.1:8080
BASE2 http://127.0.0.1:8080/Plone_test2
BASE3 http://127.0.0.1:8080/Plone_test2/manage_addProduct
BASE4 http://127.0.0.1:8080/Plone_test2/manage_addProduct/CMFDynamicViewFTI
BASE5 http://127.0.0.1:8080/Plone_test2/manage_addProduct/CMFDynamicViewFTI/addDynFolder
environ

REMOTE_ADDR '127.0.0.1'
REMOTE_HOST '127.0.0.1'
REMOTE_PORT '52545'
REQUEST_METHOD 'GET'
SERVER_PORT '8080'
SERVER_NAME 'XXXXXX'
SERVER_SOFTWARE 'waitress'
SERVER_PROTOCOL 'HTTP/1.1'
SCRIPT_NAME ''
PATH_INFO '/Plone_test2/manage_addProduct/CMFDynamicViewFTI/addDynFolder'
QUERY_STRING ''
wsgi.url_scheme 'http'
wsgi.version (1, 0)
wsgi.errors <_io.TextIOWrapper name='' mode='w' encoding='utf-8'>
wsgi.multithread True
wsgi.multiprocess False
wsgi.run_once False
wsgi.input <_io.BytesIO object at 0x000001D3C25171D0>
wsgi.file_wrapper <class 'waitress.buffers.ReadOnlyFileBasedBuffer'>
wsgi.input_terminated True
HTTP_HOST '127.0.0.1:8080'
HTTP_USER_AGENT 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Goanna/4.8 Firefox/68.0 PaleMoon/29.2.1'
HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8'
HTTP_ACCEPT_LANGUAGE 'fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3'
HTTP_ACCEPT_ENCODING 'gzip, deflate'
HTTP_REFERER 'http://127.0.0.1:8080/Plone_test2/manage_main'
HTTP_COOKIE 'plone-toolbar=%7B%22expanded%22%3Atrue%7D; tree-s="eJyLjlZyhANXWyUdhWiEiJ-fo61SLBAAALtPCeM"'
HTTP_CONNECTION 'keep-alive'
Zope2.httpexceptions <ZPublisher.httpexceptions.HTTPExceptionHandler object at 0x000001D3BDD45B50>
_auth_token '33da92ff0a3ede6b6af35726c3e0e7d6dd68938d' "

Are you sure that 8080 is the WebDAV source port? Typically, this is the default HTTP port.

When you access Plone via WebDAV, you must do so via the WebDAV source port, not the HTTP port.

Precisely to activate WebDAV for Plone 5.2.4 we had to configure buldout.cfg as follows:
"[instance]
<= base_instance
recipe = plone.recipe.zope2instance
http-address = 127.0.0.1:9090 127.0.0.1:8080
http-fast-listen = true
wsgi = on
zope-conf-additional =
webdav-source-port 9090
http-realm Welcome ".
The result is this for Waitress and Zope.conf is this:
"[server: main]
use = egg: waitress # main
listen = 127.0.0.1:9090 127.0.0.1:8080
threads = 4
clear_untrusted_proxy_headers = false
max_request_body_size = 1073741824 "
and
<zodb_db>
...
</zodb_db>
python-check-interval 1000
webdav-source-port 9090
http-realm Welcome
In these conditions :

  1. To access plone via http: port: 8080

  2. To access plone via WebDAV: port 9090.

Indeed the condition as you advised us was to separate the ports to make access possible.
Http access via port 8080 is no problem.
Likewise, access via webdav via port 9090 is also possible.
But it is not possible to complete the transfer as expected.
Am I missing something?

Thank you in advance @Dieter

Just to be sure: Do you have correct permissions in the folder you try to upload to

You must access Plone for WebDAV via its WebDAV source port, in your case via port 9090. The error information you posted has used port 8080. This is wrong for WebDAV access.

I do not know who/what is responsible for the port switch "8080 -> 9090". You might check whether your WebDAV client supports logging and allows you to see the responses. If not, you could use a tcp logger (like wireshark or a similar tool for Windows). If this, too, is not possible, you could register a ZPublisher.interfaces.IPubSuccess event handler to log the URLs and responses. Any of this approaches would allow you to determine where first the wrong port 8080 is introduced.

@espenmn, actually I'm just trying to transfer to a folder in the root of Plone at the same level as the main original plone folders and files. I can create an empty folder, but I can't transfer anything to it. If I try to transfer a folder containing files, the empty folder is created, with the famous error message ... 404 Not Found ...

I cannot set the necessary permissions.
Indeed when I connect to Zope with Cyberduck or WinSCP for example, in the right window, I have the Zope files and folders as well as the Plone folder that I created.
Then, when I right click, then "properties", I have the permissions window where everything is grayed out: I therefore do not have the possibility to set the necessary permissions.
Thanks for your help.

@dieter I will try to take a close look at your important remarks in order to make the best use of them.
I really can't figure out where it gets stuck.
Thanks again to everyone.

I was thinking about the permissions of that user in Plone. You can not set them in the info window