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

File Permanently Locked #21881

Closed
clcain opened this issue Jan 25, 2016 · 5 comments
Closed

File Permanently Locked #21881

clcain opened this issue Jan 25, 2016 · 5 comments

Comments

@clcain
Copy link

clcain commented Jan 25, 2016

I've been experiencing an issue with ownCloud's file locking, where a file that I have created cannot be deleted or renamed by any user. I created a directory and filled it with jpg files, then proceeded to share them, view them in the Gallery app, access them via webdav, etc. I then tried to delete one of the files, at which point it told me the file was locked and could not be deleted. I tried logging in via webdav and even restarting apache, but I still cannot delete the file. Using the lsof utility on my machine did not report any locks via the file system, so I would assume the problem must be related to ownCloud's oc_file_locks database. I've tried running ./occ files:scan on the directory in question, but that did not work either.

The server log gives the following error message:

Exception: {"Message":"HTTP\/1.1 423 \"Pictures\/Image.jpg" is locked","Exception":"OC\\Connector\\Sabre\\Exception\\FileLocked","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Tree.php(179): OC\\Connector\\Sabre\\File->delete()\n#1 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(287): Sabre\\DAV\\Tree->delete('Pictures\/Image.jpg')\n#2 [internal function]: Sabre\\DAV\\CorePlugin->httpDelete(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#3 \/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(469): Sabre\\Event\\EventEmitter->emit('method:DELETE', Array)\n#5 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \/var\/www\/owncloud\/apps\/files\/appinfo\/remote.php(56): Sabre\\DAV\\Server->exec()\n#7 \/var\/www\/owncloud\/remote.php(137): require_once('\/var\/www\/ownclo...')\n#8 {main}","File":"\/var\/www\/owncloud\/lib\/private\/connector\/sabre\/file.php","Line":300}

Is there a way to reset ownCloud's internal file locking mechanism or otherwise remove the lock on this file?

Server information:
Ubuntu Server 14.04
Apache 2.4.7
PHP 5.5.9
MariaDB 5.5.46
ownCloud 8.2.2 (fresh install)

@ghost
Copy link

ghost commented Jan 25, 2016

Have a look at #21360 (comment) which seems to be duplicate.

@nickvergessen
Copy link
Contributor

Please provide the necessary info from the issue template:
https://raw.githubusercontent.com/owncloud/core/master/issue_template.md

@clcain
Copy link
Author

clcain commented Jan 26, 2016

I was able to get the issue resolved temporarily by running truncate oc_file_locks; in the owncloud SQL database. However, I imagine the issue could return in the future.

@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants