-
Notifications
You must be signed in to change notification settings - Fork 282
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
Data loss with Dropbox #388
Comments
|
|
Do both computers mount with |
No, neither does. |
They should if both access the EncFS files at the same time : |
Well, the dropbox on both is running at the same time, but the access to the unencrypted files is from one OR the other only (one is a desktop, one is a laptop for travel). I'll set it on both though, thanks. |
If you mount one at a time, not both at the same time, this option will then not help. |
They are both mounted most of the time so I can work at home or on the road on the same files without having to remember to sync, just not actively accessed by me at the same time (obviously). |
Let then us know if |
I'm not about to risk losing more files, sorry ;) I've set --nocache, and also followed the suggestion from the SU post (see my initial post here) about IV chaining and stream filename encoding - looking OK so far. |
Really not sure however why IV chaining would cause such an issue, as the chain does not change (appart from the cache effect, this is why I proposed the |
Here's my setup, just to document that too.
|
So this is the new configuration which (seems to) work. |
Probably, as it seems like a sensible default initially. I don't remember as I set is up a while ago. |
Another occurence of a DropBox issue : #384 |
It worked flawlessly during (weeks ? months ? years ?) and suddenly began to fail ? |
No, it has always had this problem. I just used my laptop only for a long time, so I never saw the issue. I've had to recover files before, but nothing critical, so I just avoided / ignored the issue until this time. |
I just figured out that Dropbox also has its own local cache. |
My guess is that Dropbox's rename detection behaves pathologically with EncFS's paranoia mode. With paranoia mode, the encrypted content of a file depends on the file name and path. That means that EncFS has to re-encrypt the whole file (or, the whole directory contents, recursively) when you rename or move it. The inode number stays the same, and EncFS resets the modification time to the original value. It's not unreasonable for Dropbox to think that the encrypted file has been just renamed (new name for same content). So when Dropbox syncs the "rename" to the other PC, you will have the old content with the new file name, and EncFS will try to decrypt that, and the result is garbage. |
@rfjakob so that means in standard mode the encrypted contents depend only on the contents (and not the path / filename), so renaming should change the name and not the content then, letting Dropbox propagate the rename as it wants (with contents really staying the same)? I appreciate the FAQ addition, but don't quite understand how / if this would / should solve it. Thanks... |
Yes, exactly, that's the idea. What you are using, configured through expert mode, is fine as well, as long as you have "external iv chaining" disabled. |
So should --nocache (see the first few comments) be a recommendation for Dropbox use as well then (if so, please add to the FAQ), is it helpful, or is it irrelevant? |
No, as finally the issue here seems to be DropBox cache, not Fuse cache. |
Just to get back to this, I have been running Dropbox with encfs without the "external iv chaining" across two machines since August (with heavy work on the same tree on both machines), and have seen zero corruption (with daily checks on both machines as per the scripts I posted in comments 3 and 3). So this does indeed seem to be the fix. |
Since someone asked by mail, I have had no data loss since this fix as of now (June 2019). |
Hello,
I have been having issues using encfs with dropbox for a while, and finally dug down to try and understand when they surface. https://superuser.com/questions/949066/input-output-errors-using-encfs-folder-inside-dropbox-folder sums it up pretty well.
Basically, having a dropbox folder with encfs inside on 2 different hosts (Debian/Ubuntu in my case) can cause files to become unreadable for one host, the other host, or both (data loss). There are partial remedies, and the fix is apparently connected to running without a path-based IV (as I understand it).
The remedy (see the scripts in the next post) is scanning for input/output errors on one host, and then on the other host moving the files out of and back into the encfs (and vice versa).
The fix is (according to the SU reply):
I would suggest either a) figuring out what is going on and fixing it (i.e. run 2 hosts which create and modify files in the same dropbox/encfs FS, and hourly scan for errors), or at least b) add this to the FAQ somewhere.
The text was updated successfully, but these errors were encountered: