Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 500 trying to upload content to a locked windows file #31416

Closed
jvillafanez opened this issue May 10, 2018 · 3 comments
Closed

HTTP 500 trying to upload content to a locked windows file #31416

jvillafanez opened this issue May 10, 2018 · 3 comments

Comments

@jvillafanez
Copy link
Member

Steps to reproduce

  1. Mount a SMB external storage (windows) in ownCloud
  2. Upload several files in the external storage
  3. Sync the content with the desktop client
  4. Lock the target file in windows
  5. With the target file locked in windows, edit the file locally and upload it through the desktop client

Expected behaviour

A 403 HTTP error is thrown by the server or similar (the file can't be uploaded there because windows is locking it)

Actual behaviour

A 500 HTTP error is thrown

Server configuration

Operating system: ubuntu 16.04

Web server: apache 2.4

Database: mysql

PHP version: 7.0

ownCloud version: ownCloud 10.0.8

desktop client version: Version 2.4.1 (build 9083) - linux

Updated from an older ownCloud or fresh install: fresh install

Logs

ownCloud log (data/owncloud.log)

{"reqId":"d2d3197d-4701-489f-b84c-ce80f1eeae37","level":3,"time":"2018-05-10T12:58:56+00:00","remoteAddr":"85.57.168.79","user":"admin","app":"webdav","method":"PUT","url":"\/remote.php\/dav\/files\/admin\/WindowsNetworkDrive\/COSAS\/New%20folder\/f1\/f2\/foo.txt","message":"renaming part file to final file failed"}
{"reqId":"d2d3197d-4701-489f-b84c-ce80f1eeae37","level":4,"time":"2018-05-10T12:58:56+00:00","remoteAddr":"85.57.168.79","user":"admin","app":"webdav","method":"PUT","url":"\/remote.php\/dav\/files\/admin\/WindowsNetworkDrive\/COSAS\/New%20folder\/f1\/f2\/foo.txt","message":"Exception: {\"Message\":\"HTTP\\\/1.1 500 Could not rename part file to final file\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\",\"Code\":0,\"Trace\":\"#0 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1129): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #102)\\n#1 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(513): Sabre\\\\DAV\\\\Server->updateFile('files\\\/admin\\\/Win...', Resource id #102, NULL)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#5 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(278): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#8 \\\/opt\\\/owncloud\\\/remote.php(165): require_once('\\\/opt\\\/owncloud\\\/a...')\\n#9 {main}\",\"File\":\"\\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php\",\"Line\":226,\"User\":\"admin\"}"}
@PVince81 PVince81 added this to the planned milestone May 22, 2018
@guruz
Copy link
Contributor

guruz commented May 29, 2018

Lock the target file in windows

You mean lock on external storage right? Not on desktop windows?

@jvillafanez
Copy link
Member Author

Yes, the locking happens in the external storage.

@stale
Copy link

stale bot commented Sep 21, 2021

This issue has been automatically closed.

@stale stale bot closed this as completed Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants