LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-28-2015, 04:58 AM   #1
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Rep: Reputation: Disabled
root | Forensics | Data Recovery


So I deleted something very important accidentally almost 12 hours ago and I finally made progress. After all the files said they were extracted the folder was empty.

This is the video Im using as a tutorial.

https://www.youtube.com/watch?v=raa9...utu.be&t=1m33s

But I am on Ubuntu 13.10

I am not able to complete the first step using foremost

starting from $
He begins as #

first command is

Code:
cd /root/Desktop/
And I am unable to do that.

What is the deal?

I tried switching to sudo -i

and that gives me an error I cannot even cd Desktop at all

Last edited by Cocolate; 03-28-2015 at 05:14 AM.
 
Old 03-28-2015, 05:17 AM   #2
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
That video was made using Kali which has root as the default user (!) -- in your system, root probably does not have a "Desktop" folder at all.

Instead, just use your normal user's home directory:
Code:
cd ~/Desktop
Proceed from there using `sudo` when elevated privileges are required.
 
Old 03-28-2015, 05:19 AM   #3
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
I did do exactly that and the folder shows up on the desktop with a lock on it so I cannot see any files inside of it?
 
Old 03-28-2015, 05:37 AM   #4
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Try this:
Code:
sudo chown <user name> <name of folder>
Replace <user name> with your user name & <name of folder> with the the name of the folder.

Last edited by Head_on_a_Stick; 03-28-2015 at 05:37 AM. Reason: typo
 
Old 03-28-2015, 09:16 AM   #5
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
This is what the command looks like

Code:
$ sudo foremost -t all -v -i /dev/sdb1 -o /Desktop/recover/
So Im not sure where you mean to place [chown] and [uid]?
 
Old 03-28-2015, 09:20 AM   #6
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by Cocolate View Post
This is what the command looks like

Code:
$ sudo foremost -t all -v -i /dev/sdb1 -o /Desktop/recover/
So Im not sure where you mean to place [chown] and [uid]?
I haven't watched the whole video so I have no clue what you're talking about.

The command I gave above will change the ownership of the file in ~/Desktop to your user so that you can access the contents and it should be run independently.

If your user name is "cocolate", use this:
Code:
sudo chown -R cocolate ~/Desktop/recover
(I forgot the `-R` flag originally)
 
1 members found this post helpful.
Old 03-28-2015, 09:40 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,397

Rep: Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471
Quote:
/Desktop/recover/
Is not a valid path, use /home/your_username/Desktop/recover or ~/Desktop/recover. You can use the chown command as posted to change ownership from root to your username. This will remove the "lock".

I assume that you inadvertently deleted a file on your Android device and now attempting to recover it. It would of helped us provide better answers if you had posted your actual problem. One suggestion would be to make a copy of your SD card as an image to keep from accidentally overwriting anything.

Is this a phone or tablet?
 
Old 03-28-2015, 10:47 AM   #8
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Is not a valid path, use /home/your_username/Desktop/recover or ~/Desktop/recover. You can use the chown command as posted to change ownership from root to your username. This will remove the "lock".

I assume that you inadvertently deleted a file on your Android device and now attempting to recover it. It would of helped us provide better answers if you had posted your actual problem. One suggestion would be to make a copy of your SD card as an image to keep from accidentally overwriting anything.

Is this a phone or tablet?

Im on Ubuntu 13.10 Alcatel One Touch Fierce 2 (Thats Android 4.2.x phone)


That was a very helpful suggestion to copy my SD card image. Im recopying the data with the pathname /home/uid/Desktop/recover it is showing the same results so I will now see if I can just chown it once finished and post back with results.

I was thinking wouldnt ddrescue be a more viable option for disk recovery from a USB on Linux if this doesnt go through? Thanks for your response.
 
Old 03-28-2015, 01:04 PM   #9
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
Yes all of those things worked.

I would have been done in 5 min had I known:

Switch from MTP to SD card

chown uid

Now ubuntu wont play .mov

18 hours later
 
Old 03-28-2015, 01:14 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,397

Rep: Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471Reputation: 5471
With ddrescue you can create an image of the disk. foremost, testdisk or testdisk can be run on the mounted image versus the disk.

Hopefully the deleted file is on the memory card versus the phone's internal memory.
 
Old 03-28-2015, 02:05 PM   #11
Cocolate
Member
 
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
With ddrescue you can create an image of the disk. foremost, testdisk or testdisk can be run on the mounted image versus the disk.

Hopefully the deleted file is on the memory card versus the phone's internal memory.
I suspect since where I record videos are saved on the sd card theyd be recovered from there as well do you have any additional input?

If the data is on the internal memory Im completely screwed with Ubuntu I'll just have to create a Windozer disc or possibly see if ddrescue is the solution.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unrecognized root partition filesystem, need help with data recovery carlito11973 Linux - Hardware 3 11-10-2010 07:50 PM
[SOLVED] Combining anti-virus + data recovery + image recovery? littlebigman Linux - Software 8 08-12-2010 02:39 AM
Data recovery/forensics idlehands Linux - Security 11 08-01-2010 02:45 PM
Corrupted root inode on ext3 RAID - data recovery LostTowel Linux - Software 2 08-23-2008 11:10 PM
Helix Data Forensics/System Repair iso AwesomeMachine Linux - Software 2 09-21-2005 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration