-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
"folder is locked" SNAFU #24321
Comments
I found the oc_file_locks to be completely empty, so I had no way of unlocking, then I accidentally deleted and restored the folder on the server yet again, and this time, it was restored under its original name. |
Please never do that, it will mess up badly. The reason why the folder was locked is probably because people were using it, maybe their sync clients were downloading the contents. You can't rename a folder while people are accessing its contents. Maybe waiting a day or so until activity slows down might give a window of opportunity to rename the folder. |
You might be able to recover stuff by doing a "occ files:scan --all" to resync the file cache with the local changes. |
Not a bug => closing |
@PVince81 I am aware that I should "never do that". I didn't do the deletion on purpose, it happened by accident. Once the DEL key got pressed by accident, the other time, the cursor was misplaced while clicking. If this ends in a mess, then ownCloud's handling of such situations should be improved. Clearly, a message that "the folder is locked" without any indication to what the reason might be and what the remedy is, is not the best way of handling this. Also, the ownCloud client seems to have been totally confused by it, it gave up with an error. The only remedy I found to avoid data corruption was to delete this ownCloud account on my machine and re-create it and do a clean sync. I fear asking one of my users to do the same might have been asking too much from them already. And the sole cause of this SNAFU was that the DEL key one my keyboard was pressed by accident - which happens. I suppose it happens all the time. So in my view there is a bug here, or a cumulation of bugs. |
Would it help if the message said "Folder is locked because it is being accessed by other users at the moment, please try again later" ? |
I am not sure. I don't think that other users were the cause of the failure to rename the folder. Renaming a folder for yourself doesn't seem to affect other users, they still have the old names. Of course, a clearer warning would be less confusing. The other thing is that I resorted to renaming the folder locally again and this aggravated the mess and made the client simply throw the towel. There is nothing preventing one from a local renaming, but is was not propagated to the server and after I ended and restarted the client, there was no indication of any problem, yet the inconsistency between the local folder name and the one on the server persisted. I have no idea whether this would have eventually been tackled, as there was no information at all |
Hmmm you're right. Could also be a bug that locking is too strong here. |
Could not reproduce this issue on 9.0.2 with a restored then renamed folder |
Had the same problem on 9.0.3 |
are you guys using ajax cron ? if yes please try switching to system cron, it should make it run more often and also expire stray locks. |
Closing in favor of ajax cron ticket #20380 |
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. |
I accidentally deleted a shared folder. First I restored it locally, but then I found that owncloud wouldn't restore the stares, so I deleted the locally restored file and restored it from owncloud's deleted files to ensure that for the other users, the folder is the same as before.
ownClould restored the folder, but with "(wiederhergestellt)" appended. I wanted to rename it to its original name, but the interface said, that the folder cannot be renamed because the folder is locked, providing no way of unlocking it. So instead I renamed it locally, but the change seemingly wasn't propagated to the server. So now I have an inconsistency between local names and names on the server which apparently cannot be fixed without manipulating the database.
I suppose such SNAFU shouldn't happen. This is what the lockfile says:
Exception: {"Message":"HTTP/1.1 423 "FOLDER (Wiederhergestellt)" is locked","Exception":"OC\Connector\Sabre\Exception\FileLocked","Code":0,"Trace":"#0 /var/www/user_userweb/chroot/htdocs/domain.org/www/oc/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(635): OC\Connector\Sabre\ObjectTree->move('FOLDER (Wiederhe...', 'FOLDER')\n#1 [internal function]: Sabre\DAV\CorePlugin->httpMove(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#2 /var/www/user_userweb/chroot/htdocs/domain.org/www/oc/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 /var/www/user_userweb/chroot/htdocs/domain.org/www/oc/3rdparty/sabre/dav/lib/DAV/Server.php(469): Sabre\Event\EventEmitter->emit('method:MOVE', Array)\n#4 /var/www/user_userweb/chroot/htdocs/domain.org/www/oc/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#5 /var/www/user_userweb/chroot/htdocs/domain.org/www/oc/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()\n#6 /var/www/user_userweb/chroot/htdocs/domain.org/www/oc/remote.php(137): require_once('/var/www/user_j...')\n#7 {main}","File":"/var/www/user_userweb/chroot/htdocs/domain.org/www/oc/lib/private/connector/sabre/objecttree.php","Line":239}
The text was updated successfully, but these errors were encountered: