Repository navigation
Closed
Milestone
Description
Steps to reproduce
- Install OC and Windows Client
- Add SFTP external storage already containing data
- Wait for sync
- Take SFTP server offline
- OC Clients will start to delete local folders and files, starting with empty folders. Giving errors on folders already containing files.
Expected behaviour
If there is an external storage defined and offline, do not assume it has been deleted altogether. Rather assume it is offline and for the time being, simply ignore/skip the referenced files and folders.
Actual behaviour
OC Server seemingly assumes the worst and communicates it as such to the connected clients.
Server configuration
Operating system:
Windows 2012R2
Web server:
IIS 8.5
Database:
MariaDB 10
PHP version:
5.6
ownCloud version: (see ownCloud admin page)
ownCloud 7.0.2 (stable)
Updated from an older ownCloud or fresh install:
No
List of activated apps:
OOTB, just External Storage added
The content of config/config.php:
'E:\shares\com\oc', 'dbtype' => 'mysql', 'version' => '7.0.2.1', 'dbname' => 'owncloud', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'installed' => true, 'forcessl' => true, 'loglevel' => '2', ); **Are you using external storage, if yes which one:** local/smb/sftp/... SFTP **Are you using encryption:** yes/no No ### Client configuration **Browser:** FF, Chrome, IE - in that order **Operating system:** Win7Ult OC Client 1.6.3 (build 3721) ### Logs #### Web server log 2014-09-17 19:17:45 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.5 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 894 2014-09-17 19:17:50 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 2810 2014-09-17 19:17:50 1.2.3.4 PROPFIND /remote.php/webdav/ZAFSS1/Projects - 443 - 1.2.3.5 Mozilla/5.0+(Windows)+mirall/1.6.3 - 404 0 0 2807 2014-09-17 19:17:54 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 6037 2014-09-17 19:17:56 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 4960 2014-09-17 19:17:56 1.2.3.4 PROPFIND /remote.php/webdav - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 401 0 0 359 2014-09-17 19:18:02 1.2.3.4 PROPFIND /remote.php/webdav - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 5015 2014-09-17 19:18:05 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 11264 2014-09-17 19:18:05 1.2.3.4 PROPFIND /remote.php/webdav - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 401 0 0 312 2014-09-17 19:18:22 1.2.3.4 GET /status.php - 443 - 1.2.3.5 Mozilla/5.0+(Windows)+mirall/1.6.3 - 200 0 0 234 2014-09-17 19:18:33 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.5 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 10645 2014-09-17 19:18:40 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 20791 2014-09-17 19:18:43 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.5 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 10691 2014-09-17 19:18:44 1.2.3.4 PROPFIND /remote.php/webdav - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 38300 2014-09-17 19:18:47 1.2.3.4 PROPFIND /remote.php/webdav/ZAFSS1/Projects - 443 - 1.2.3.5 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 401 0 0 328 2014-09-17 19:18:47 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 14465 2014-09-17 19:18:47 1.2.3.4 PROPFIND /remote.php/webdav - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 401 0 0 453 2014-09-17 19:18:48 1.2.3.4 PROPFIND /remote.php/webdav/ZAFSS1/Projects - 443 - 1.2.3.5 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 404 0 0 1046 2014-09-17 19:18:48 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 24441 2014-09-17 19:18:50 1.2.3.4 PROPFIND /remote.php/webdav - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 2895 2014-09-17 19:18:53 1.2.3.4 PROPFIND /remote.php/webdav/ADC - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 3131 2014-09-17 19:18:57 1.2.3.4 PROPFIND /remote.php/webdav/ADC/URLs - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 3385 2014-09-17 19:19:00 1.2.3.4 PROPFIND /remote.php/webdav/ADC/Training - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 3399 2014-09-17 19:19:03 1.2.3.4 PROPFIND /remote.php/webdav/ADC/Tests - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 3328 2014-09-17 19:19:03 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 1265 2014-09-17 19:19:05 1.2.3.4 PROPFIND /remote.php/webdav - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 401 0 0 328 2014-09-17 19:19:06 1.2.3.4 PROPFIND /remote.php/webdav - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 1578 2014-09-17 19:19:06 1.2.3.4 PROPFIND /remote.php/webdav/ADC/Source - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 3187 2014-09-17 19:19:09 1.2.3.4 PROPFIND /remote.php/webdav/GDMS - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 2515 2014-09-17 19:19:09 1.2.3.4 PROPFIND /remote.php/webdav/ADC/Releases - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 3265 2014-09-17 19:19:11 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 1062 2014-09-17 19:19:11 1.2.3.4 PROPFIND /remote.php/webdav/GDMS/URLs - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 2781 2014-09-17 19:19:13 1.2.3.4 PROPFIND /remote.php/webdav/ADC/Docs - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 3234 2014-09-17 19:19:13 1.2.3.4 PROPFIND /remote.php/webdav/ - 443 - 1.2.3.5 Mozilla/5.0+(Windows)+mirall/1.6.3 - 207 0 0 796 2014-09-17 19:19:14 1.2.3.4 PROPFIND /remote.php/webdav/GDMS/Training - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 2671 2014-09-17 19:19:16 1.2.3.4 PROPFIND /remote.php/webdav/ADC/Docs/Workflows - 443 - 1.2.3.7 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 3218 2014-09-17 19:19:16 1.2.3.4 PROPFIND /remote.php/webdav/GDMS/Tests - 443 - 1.2.3.6 Mozilla/5.0+(Windows)+csyncoC/0.91.5+neon/0.30.0 - 207 0 0 2859 #### ownCloud log (data/owncloud.log) {"app":"PHP","message":"Cannot connect to apc.example.com. Error 10061. No connection could be made because the target machine actively refused it. at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#875","level":3,"time":"2014-09-17T19:17:48+00:00"} {"app":"PHP","message":"unpack(): Type N: not enough input, need 4, have 0 at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3518","level":3,"time":"2014-09-17T19:17:48+00:00"} {"app":"PHP","message":"extract() expects parameter 1 to be array, boolean given at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3518","level":3,"time":"2014-09-17T19:17:48+00:00"} {"app":"PHP","message":"Undefined variable: length at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3519","level":3,"time":"2014-09-17T19:17:48+00:00"} {"app":"PHP","message":"Unsupported signature format at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3638","level":3,"time":"2014-09-17T19:17:48+00:00"} {"app":"core","message":"Login failed","level":3,"time":"2014-09-17T19:17:48+00:00"} {"app":"PHP","message":"Cannot connect to apc.example.com. Error 10061. No connection could be made because the target machine actively refused it. at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#875","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"PHP","message":"unpack(): Type N: not enough input, need 4, have 0 at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3518","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"PHP","message":"extract() expects parameter 1 to be array, boolean given at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3518","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"PHP","message":"Undefined variable: length at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3519","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"PHP","message":"Unsupported signature format at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3638","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"core","message":"Login failed","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"PHP","message":"Cannot connect to apc.example.com. Error 10061. No connection could be made because the target machine actively refused it. at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#875","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"PHP","message":"unpack(): Type N: not enough input, need 4, have 0 at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3518","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"PHP","message":"extract() expects parameter 1 to be array, boolean given at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3518","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"PHP","message":"Undefined variable: length at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3519","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"PHP","message":"Unsupported signature format at D:\sites\com\oc\3rdparty\phpseclib\phpseclib\phpseclib\Net\SSH2.php#3638","level":3,"time":"2014-09-17T19:17:49+00:00"} {"app":"core","message":"Login failed","level":3,"time":"2014-09-17T19:17:49+00:00"}
Activity
LukasReschke commentedon Sep 18, 2014
@MTRichards Might be also important for EE considering SP et al.
MTRichards commentedon Sep 18, 2014
@jnfrmarks can we test?
@rperezb what happens in this situation for SP and network drives?
rperezb commentedon Sep 18, 2014
Checked on Network Drive, it deppends on the connectivity check:
From ownCloud we are not deleting anything, the thing is that we are not showing any information due to the fact that we don´t have access to it.
MTRichards commentedon Sep 18, 2014
I am most concerned about what happens to the desktop client. Do we delete the files? We should not, it should be a temporary error thrown...
Green9332 commentedon Sep 18, 2014
Only good thing about this is the folders/files end up in Deleted Items and can therefore be restored at the OC server. But if you had a 100GB repository shared with 100 clients, OC will start deleting potentially 10TB of files on the clients - which has to be replicated again. Empty folders are definitely all deleted. As mine was a production system (in which I had to restart the 50TB RAID NAS for a software update), I did not sit idly by to wait until the damage was done. In fact, I watched it very very closely since I didn't factually know what will happen and expected something iffy will probably come of the situation.
So, I stopped the OC rather fast to prevent any further checking/replicating/propagation of the issue. What I could see in realtime was that the client also tried to delete the folders which contained files, but gave errors (most likely the only saving grace was that OC client tried to delete the folders first before deleting the contained files - thereby running into a "folder not empty" error. If not for that, I'm pretty sure the files would have been wiped eventually as well, and then the folders)
So, whilst there may not be an issue on the web interface for a disconnected store, you may also not have anything to show after a while if the OC has moved it all to Deleted Items. And/or your files will still be on the store (since it was offline during the OC process), but OC would have "moved" it's cached references to the Deleted Items.
Either way, it is a train smash waiting to happen.
RobinMcCorkell commentedon Sep 18, 2014
Yes, this was noticed a while back in that issue I just linked. ownCloud currently does not differentiate between non-existent/broken storages and temporary failures. @icewind1991 what do you think, high severity?
PVince81 commentedon Sep 19, 2014
I think @icewind1991 has added some code for server to server sharing where it's possible for mount points to have the state "currently not available". The same status/code could be reused for regular external storages, assuming that the clients should be able to understand that.
I believe it might return a 503 when propfinding that folder.
@icewind1991 can you confirm ?
icewind1991 commentedon Sep 19, 2014
Yes, storages can throw a
\OCP\Files\StorageNotAvailableExceptionwhich will be handled correctly by the webinterface and sync clientrperezb commentedon Sep 19, 2014
@MTRichards yes, if there is not connectivity with the mountpoint, on the desktop the data is "removed" from the desktop client. For us, it´s the same situation as your credentials have not been entered or have been modified.
If we wanted not to be removed the data, we would have to change the plugins design; plus, check how the desktop client handles http 503.
MTRichards commentedon Sep 19, 2014
Ok @rperezb
As an enhancement, we should seek to use this:
So that these files are not deleted just because the server goes down. In fact, in at least one use case (server goes down) the desktop is the only source for the files. If they get deleted, then this would be bad. So Yes, this needs to be put into that repo as an enhancement for SP and win network drives.
MTRichards commentedon Sep 19, 2014
Also, to add, we need to consider a time based expiration. If it is offline for, say, 7 days it gets removed by the sync client. But we don't want the sync client removing things just if there is a network error that is highly temporary. Since we can't tell the difference, we should have a time window.
This should also be reflected in all of our external storage connectors...
11 remaining items
ownclouders commentedon Jan 13, 2018
Hey, this issue has been closed because the label
status/STALEis set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.(This is an automated comment from GitMate.io.)
ownclouders commentedon Feb 23, 2018
Hey, this issue has been closed because the label
status/STALEis set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.(This is an automated comment from GitMate.io.)
PVince81 commentedon Oct 15, 2018
closing in favor of #32552 which has more research