Failed to be enable WebDAV in Plone 5.2.1

Hi,

I installed Plone 5.2.1 with buildout tool.
Now adding webdav-address to buildout.cfg as below, then re-run bin/buildout -c develop.cfg,
started the instant with bin/plonectl fg, but i cannot find the port 9800 for listening (means the WebDAV failed to be enable).

[instance]
<= instance_base
recipe = plone.recipe.zope2instance
http-address = 8080
webdav-address = 9800
Zope Version 	(4.1.3, python 3.8.2, linux)
Python Version 	3.8.2 (default, May 7 2020, 20:00:49) [GCC 7.3.0]
System Platform 	linux
$ netstat  -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:34487         0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:15490         0.0.0.0:*               LISTEN     
tcp6       0      0 :::33060                :::*                    LISTEN     
tcp6       0      0 :::1716                 :::*                    LISTEN     
tcp6       0      0 :::10808                :::*                    LISTEN     
tcp6       0      0 :::10809                :::*                    LISTEN 

Please read the docs:

webdav-address
Give a port for the WebDAV server. This enables the WebDAV server. Used for ZServer only, not WSGI.

WebDAV must be enabled in wsgi.ini

WebDAV support was temporary lost with Zope (it was removed from Zope and put into ZServer). Recent Zope versions (I do not know whether the Zope in Plone 5.2.1 is sufficiently recent) have again WebDAV support - but this works only with WSGI, not ZServer.

With Plone, the situation is a bit difficult. You can use it with either ZServer or waittress (i.e. WSGI). Configuration must go at different places. Ideally, the buildout recipe does the right thing but it may not yet do that. Check .../parts/<instance>/etc/{wsgi.ini|zope.conf}. For WSGI, the webdav definition must be in wsgi.ini; for ZServer in zope.conf.

Long story short: you need to provide your own wsgi.ini file containing the necessary configuration for WebDAV and provide to buildout through the wsgi-ini-template option (see zope2instance recipe docs).

The Zserver doesn't support Python3, So the Plone in Python3 does not support WebDAV.

https://training.plone.org/5/wsgi/prz-recipe-options.html#wsgi

Another refer to:

WebDAV and FTP are part of ZServer which is removed when running on Python 3. We might need a replacement if the uses-cases that we use it for are still valid nowadays.
https://github.com/plone/Products.CMFPlone/issues/2537

That is not uptodate. Webdav support was added back to Zope core.

@pbauer maybe you want to update that issue?

Do you mean the Zope with Python3 supports Webdav ?

It was added back with Zope 4.3

And Zope 4 is both Py 27 and 3.5 and upwards compatible

I do not use Plone, so I do not know what this means for Plone, ie I do not know which Plone versions depend on which Zope versions.

I am afraid but to have a smooth experience you have to wait Plone 5.2.2.

I just fired up an instance built with buildout coredev (branch 5.2 and Python 3.8) and witnessed that you can edit an odt file with:

libreoffice webdav://localhost:8080/Plone/example.odt

No wsgi.ini configuration was needed and I had not to specify webdav-address in my buildout.

Also browsing the site with a webdav client worked as expected.

BTW kudos to the Zope people for the smooth experience provided, I was really impressed :slight_smile:

2 Likes

Plone Foundation Code of Conduct