If the repairDatabase command cannot create a directory during the repair process, it can abort the repair and delete the temporary files, which may in certain cases be the only copy of the data. This is a regression from 2.4 where the repair would leave the partially repaired data in a temporary directory.
Users affected by this issue can potentially lose the data they are trying to repair.
It is highly recommended to make a backup copy before running a repair. For replica set nodes, a node can be fully resynced from another member instead of repairing it. Ensuring correct file permissions for the mongodb user will also avoid the issue.
The removal of database files now happens after the directory creation, leaving the files in the temporary directory intact on failure. This restores the previous behavior of version 2.4.x.
Version 2.6.0 is affected by this issue.
The patch is included in the 2.6.1 production release.