When dav fs want to PUT new contents, it first tries to open resource for writing in dav_fs_open_stream(). It specifies two modes, DAV_MODE_WRITE_TRUNC, DAV_MODE_WRITE_SEEKABLE, and default mode which simply open with OS default permissions. However, the log for all three modes is the same. "An error occurred while opening a resource." This becomes misleading since it may fail for two reasons (1) In the default mode to open with OS default permissions, the file may not exist (2) in the two modes DAV_MODE_WRITE_XXXX , open for writing may fail because of file permissions. Also, it is appreciated to specify the actual file path to be opened, since some Rewrite rules may be specified. The inconsistency between the real file path and URL in the log may remind sysadmin about this. [1] Therefore, I think we can improve the log a bit by providing the file name and more detailed reasons for each failed case. Any thoughts are appreciated! [1]https://serverfault.com/questions/20169/webdav-on-centos-getting-403-error-when-attempt-to-upload
Created attachment 37219 [details] A patch to improve the error message for dav_fs_open_stream
Thanks for the patch! Merged in r1881736.