Unable to upload file to en external mount with DFS


#1

Hi, I am currently testing Owncloud with an enterprise Trial.
I mounted an external storage using the Windows Drive app.
I can see the files, I can download the files but I can’t upload.

Upload “kinda” works, I see the file when I access the network share but it shows a .part file that once renamed to its original name is working as intended (tried to upload a PDF file that was renamed by Owncloud to a .PART file, I renamed it back to PDF and it worked). but for some reasons Owncloud is not able to rename it I believe?

As a result, the client or Web UI report the following errors.

Expected behaviour
The file is being uploaded to the SMB share

Actual behaviour
The client report an error :
A HTTP transmission error happened. : The server file discovery reply is missing data.
Server replied “503 Service Unavailable” to “PUT …” (Failed to check file size: )

Steps to reproduce

  1. Install owncloud (tested with Appliance for VirtualBox and Self install on Ubuntu server latest version)
  2. Mount SMB using the owncloud GUI
  3. Synchronize with the owncloud client
  4. Try to add a file to the SMB share

Server configuration
Operating system: Ubuntu server 18.04
Web server: Apache2
Database: MySQL
PHP version: 7.2
ownCloud version: 10.0.10
Storage backend (external storage): Windows Server 2016 SMB share

Client configuration
Client version: 2.5.1
Operating system: Windows 10 1809
OS language: EN
Installation path of client: C:\Program Files (x86)\ownCloud

Logs

  1. Client logfile:
    A HTTP transmission error happened. : The server file discovery reply is missing data.
    Server replied “503 Service Unavailable” to “PUT …” (Failed to check file size: )

  2. Web server error log:
    {“reqId”:“1d02692c-0e9b-473b-a8c8-1778f1d1926d”,“level”:4,“time”:“2019-01-25T12:39:38+00:00”,“remoteAddr”:“192.168.1.131”,“user”:“5E08A3B5-F46D-4655-915B-449C6EE67BCE”,“app”:“webdav”,“method”:“PUT”,“url”:"/remote.php/dav/files/5E08A3B5-F46D-4655-915B-449C6EE67BCE/New%20Share/Massiot%20Alexandre/ownCloud%20Manual.pdf",“message”:“Exception: HTTP/1.1 503 Failed to check file size: : {“Exception”:“Sabre\\DAV\\Exception\\ServiceUnavailable”,“Message”:“Failed to check file size: “,“Code”:0,“Trace”:”#0 \/var\/www\/html\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php(172): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id #75)\n#1 \/var\/www\/html\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(1095): OCA\\DAV\\Connector\\Sabre\\Directory->createFile(‘ownCloud Manual…’, Resource id #75)\n#2 \/var\/www\/html\/lib\/composer\/sabre\/dav\/lib\/DAV\/CorePlugin.php(525): Sabre\\DAV\\Server->createFile(‘files\/5E08A3B5-…’, Resource id #75, NULL)\n#3 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#4 \/var\/www\/html\/lib\/composer\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 \/var\/www\/html\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit(‘method:PUT’, Array)\n#6 \/var\/www\/html\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#7 \/var\/www\/html\/apps\/dav\/lib\/Server.php(298): Sabre\\DAV\\Server->exec()\n#8 \/var\/www\/html\/apps\/dav\/appinfo\/v2\/remote.php(31): OCA\\DAV\\Server->exec()\n#9 \/var\/www\/html\/remote.php(165): require_once(’\/var\/www\/html\/a…’)\n#10 {main}”,“File”:”\/var\/www\/html\/apps\/dav\/lib\/Connector\/Sabre\/File.php",“Line”:291}"}

Thanks for your help!
AM.


#2

Can you check your share permissions on the server side of the share? ACLs would be important to check.


#3

Hi and thank you for your answer.

The share is setup using the user credentials (my credentials) that I also use to connect directly to the share.
Owncloud is also able to write the file to the share, but it just doesn’t rename it and popup an error.

So I am not sure to know what I should look for…

Thanks again,
AM.


#4

Where is your share?


#5

Ok, so I recreated another shared folder and gave access to everyone in RW for testing purposes.

At first it worked.
Then I added the share to a DFS an there it started to do it again.

The share is on a Windows server 2016
\192.168.1.31\test
Access RW everyone.

Thanks,
AM.


#6

So with DFS it does not work, without DFS it works?

This is the main issue here. I am not sure if ownCloud supports DFS.


#7

Yes with DFS I am not able to get the file renamed on the share.


#8

Okay, ownCloud supports DFS, but the WND app does not.

Can you try mounting your share with normal SMB option?


#9

Same using SMB instead of WND


#10

After some more tests, I found the following issue with smbclient.

Using smbclient I can connct to the DFS share and list the files and folder, browse them…

But when it comes to the rename command, it fails and display the following:

smb: …; rename …txt …txt NT_STATUS_OBJECT_PATH_NOT_FOUND renaming files …txt ->; …txt

I also found this article on the samba bug tracker:
https://bugzilla.samba.org/show_bug.cgi?id=13599#c0

So it really seeams related to DFS on Windows server 2016.
The samba team seeams also to be aware of the issue even though no one replied to the so link ticket.

What do you think should be done?
Is there another way to use SMB share without the smbclient library on owncloud?

I will continue testing with and without DFS.

Thanks,
AM.


#11

That’s an important find. I updated the title of your topic to include DFS.