Help Recovering Files With Scalpel

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
swirlinglotus
Level 1
Level 1
Posts: 3
Joined: Tue May 05, 2015 2:28 pm

Help Recovering Files With Scalpel

Post by swirlinglotus »

I was using LibreOffice today and it shut down with no warning. I was typing one second and the window was gone the next. There were actually four LO windows open and they all closed. A window saying "Recover Pages" (or something to that effect) popped up. I clicked Recover and Finish but only two of the pages were actually recovered. After a bit of research, I installed Scalpel. From what I understand, to recover .odt files, you have to insert this at the bottom of scalpel.conf:


#---------------------------------------------------------------------
# OPENOFFICE FILES
#---------------------------------------------------------------------
odt y 20000000 PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.textPK META-INF/manifest.xmlPK????????????????????
ods y 10000000 PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.spreadsheetPK META-INF/manifest.xmlPK????????????????????
odp y 10000000 PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.presentationPK META-INF/manifest.xmlPK????????????????????
# odg y 10000000 PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.graphicsPK META-INF/manifest.xmlPK????????????????????
# odc y 10000000 PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.chartPK META-INF/manifest.xmlPK????????????????????
# odf y 10000000 PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.formulaPK META-INF/manifest.xmlPK????????????????????
# odi y 10000000 PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.imagePK META-INF/manifest.xmlPK????????????????????
# odm y 10000000 PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.text-masterPK META-INF/manifest.xmlPK????????????????????
# sxw y 10000000 PK????????????????????????????mimetypeapplication/vnd.sun.xml.writerPK META-INF/manifest.xmlPK????????????????????
#---------------------------------------------------------------------

My question is how do you do that? I'm able to uncomment on that page, but I'm not able to add anything new. I'm new-ish to linux so I'm sure there's something obvious I'm missing. Any help would be appreciated!!!

Buzzsaw
Level 6
Level 6
Posts: 1310
Joined: Sat Aug 23, 2014 12:53 pm

Re: Help Recovering Files With Scalpel

Post by Buzzsaw »

scalpel.conf is in /etc/scalpel, therefore only root can write to it.

To edit it as root, use sudo nano /etc/scalpel/scalpel.conf to use the command line text editor Nano, or gksudo [text editor] to use whatever GUI text editor is installed. Replace [text editor] with pluma (MATE desktop), kate (KDE desktop) or gedit (Cinnamon and Xfce desktop).
I'm able to uncomment on that page, but I'm not able to add anything new.
This puzzles me. Uncommenting, i.e. deleting '#'s is editing the file the same as adding something new is. If you can do one, you can do the other. Besides, any sort of editing is possible when not root. It's saving afterwards that only root can do.

Cosmo.
Level 23
Level 23
Posts: 17827
Joined: Sat Dec 06, 2014 7:34 am

Re: Help Recovering Files With Scalpel

Post by Cosmo. »

Buzzsaw wrote:Besides, any sort of editing is possible when not root. It's saving afterwards that only root can do.
At least for gedit in Cinnamon this is not correct. If I do gedit /etc/fstab (note: without sudo) I get fstab opened in the text editor and in the title bar it says "Write-protected"; any kind of editing (deleting, adding) is impossible (saving naturally also). I don't know, if this on other desktop environments / text editors the same.

Buzzsaw
Level 6
Level 6
Posts: 1310
Joined: Sat Aug 23, 2014 12:53 pm

Re: Help Recovering Files With Scalpel

Post by Buzzsaw »

Cosmo. wrote:At least for gedit in Cinnamon this is not correct. If I do gedit /etc/fstab (note: without sudo) I get fstab opened in the text editor and in the title bar it says "Write-protected"; any kind of editing (deleting, adding) is impossible (saving naturally also). I don't know, if this on other desktop environments / text editors the same.
I only use Mousepad and nano, and in both of them it's possible to edit a read-only file, but not to save it.

Post Reply

Return to “Software & Applications”