WebDav uploads resulting in empty files (500 Internal Server Error)

484 views
Skip to first unread message

Philipp Leufke

unread,
Jun 4, 2014, 7:18:01 AM6/4/14
to sea...@googlegroups.com
Hi everybody,

I got seafdav to mostly work without and with ssl/nginx: logging in, browsing the folders, reading/downloading files and creating new folders seem to work fine.

However, all my attempts to upload new files result in just empty files with correct file names.

Here is the seafdav.log for an attempt to upload a (small) ssl certificate file:

[2014-06-04 13:02:59,169]:   - x...@yyy.de - "PROPFIND /tmp/upload" length=235, depth=0, connection="Keep-Alive", agent="gvfs/1.20.1", elap=0.050sec -> 207 Multistatus
[2014-06-04 13:02:59,267]:   - x...@yyy.de - "PROPFIND /tmp/upload" length=155, depth=0, connection="Keep-Alive", agent="gvfs/1.20.1", elap=0.053sec -> 207 Multistatus
[2014-06-04 13:02:59,348]:   - x...@yyy.de - "PROPFIND /tmp/upload" length=235, depth=0, connection="Keep-Alive", agent="gvfs/1.20.1", elap=0.052sec -> 207 Multistatus
[2014-06-04 13:02:59,426]:  Raising DAVError 404 Not Found: The specified resource was not found
[2014-06-04 13:02:59,426]:   - x...@yyy.de - "HEAD /tmp/upload/cacert.crt" depth=0, connection="Keep-Alive", agent="gvfs/1.20.1", elap=0.052sec -> 404 Not Found
[2014-06-04 13:02:59,834]:  Traceback (most recent call last):
  File "/srv/seafile/seafile-server-3.0.2/seahub/thirdpart/wsgidav/error_printer.py", line 38, in __call__
    for v in self._application(environ, start_response):
  File "/srv/seafile/seafile-server-3.0.2/seahub/thirdpart/wsgidav/request_resolver.py", line 189, in __call__
    for v in app(environ, start_response):
  File "/srv/seafile/seafile-server-3.0.2/seahub/thirdpart/wsgidav/request_server.py", line 96, in __call__
    for v in method(environ, start_response):
  File "/srv/seafile/seafile-server-3.0.2/seahub/thirdpart/wsgidav/request_server.py", line 713, in doPUT
    res.endWrite(withErrors=True)
  File "/srv/seafile/seafile-server-3.0.2/seahub/thirdpart/wsgidav/addons/seafile/seafile_dav_provider.py", line 107, in endWrite
    os.unlink(self.tmpfile_path)
AttributeError: 'SeafileResource' object has no attribute 'tmpfile_path'

[2014-06-04 13:02:59,835]:  Traceback (most recent call last):
  File "/srv/seafile/seafile-server-3.0.2/seahub/thirdpart/wsgidav/error_printer.py", line 49, in __call__
    raise asDAVError(e)
DAVError: DAVError(500 Internal Server Error: An internal server error occurred
    Source exception: ''SeafileResource' object has no attribute 'tmpfile_path'')

[2014-06-04 13:02:59,835]:  e.srcexception:
'SeafileResource' object has no attribute 'tmpfile_path'
[2014-06-04 13:02:59,836]:   - x...@yyy.de - "PUT /tmp/upload/cacert.crt" length=1005, connection="Keep-Alive", agent="gvfs/1.20.1", elap=0.114sec -> 500 Internal Server Error


I don't know what it's all about the tmpfile_path mentioned here.
Any help is welcome…

Best regards,
-- Philipp

JiaQiang Xu

unread,
Jun 4, 2014, 8:37:26 AM6/4/14
to sea...@googlegroups.com
The file is uploaded to tmp file and then written into Seafile. Do you have proper permission to the folder seafile-data/webdavtmp ?

Philipp Leufke

unread,
Jun 4, 2014, 12:37:48 PM6/4/14
to sea...@googlegroups.com

Am Mittwoch, 4. Juni 2014 14:37:26 UTC+2 schrieb JiaQiang Xu:
The file is uploaded to tmp file and then written into Seafile. Do you have proper permission to the folder seafile-data/webdavtmp ?


Well, that was a really quick help. Thanks a lot!
Permissions got messed up due to running seafile as root, on first time after activating webdav and later running it as user seafile again.

Thanks again!
Reply all
Reply to author
Forward
0 new messages