Can't restore files in a read-only directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Déjà Dup |
Fix Released
|
Medium
|
Michael Terry | ||
10 |
Fix Released
|
Medium
|
Michael Terry | ||
11 |
Fix Released
|
Medium
|
Michael Terry | ||
deja-dup (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Karmic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Let's say your backup contains a directory without write permissions (a common example is apparently the Jaunty Ubuntu One directory). When restoring that directory, you will get errors about any files under that directory (because Deja Dup can't move files into it!).
The fix is to set directory permissions after writing subfiles and to fallback to copying from the temporary restore directory if moves don't work.
For an Ubuntu 9.10 SRU:
There are three closely related bugs:
- Restoring files from a read-only directory fails
- Restoring a file from a directory that doesn't exist yet fails
- Restoring a single file downloads all files
The first two can manifest themselves as data loss (or at least, no easy way to get your data that is locked inside your backup). The last could make it very difficult to restore specific data if you are short on disk space (would need to use a different computer). Thus, the SRU request.
The first (read-only directory) is more common than the other problems -- apparently the Jaunty Ubuntu One folder was read-only.
This was fixed in Lucid by pushing new upstream version 11.1-0ubuntu1, which included the fix. The attached patch for Karmic is modified from upstream bug-fix release 10.3.
To reproduce, create a folder that is read only. Put some files in it. Back up that folder with Deja Dup. Move the folder out of the way. Run Deja Dup, click restore, and restore the files in their original location. With 10.2, it fails. With 10.2+patch, it succeeds.
There shouldn't be much of a regression potential. The code changes are light.
Changed in deja-dup: | |
assignee: | nobody → Michael Terry (mterry) |
importance: | Undecided → Medium |
milestone: | none → 12.0 |
status: | New → Fix Committed |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Changed in deja-dup: | |
status: | Fix Committed → Fix Released |
Here's a karmic debdiff to update to Deja Dup 10.3, which will fix this bug and another (bug 481582).
I think this is useful as an SRU, because this could manifest as data loss if you can't restore files from your backup that are in a read-only directory. It's not clear that this is very common, but apparently Jaunty's Ubuntu One folder was read-only? My karmic folder isn't, but I saw a user that never changed that who had a read-only Ubuntu One folder.
I'm not worried about Lucid, because it will eventually update to 11.1 or later, which has these fixes. I can update that later this cycle.