Ubuntu deleted files from guest account desktop

10,512

Solution 1

Ubuntu's Guest account is a special type of account, which has its home directory set to the mount point of a tmpfs filesystem, which is used to store data which does not need to be persisted after a reboot.

The data in tmpfs is stored in RAM backed up by the swap space, so it is likely the data had never been written to disk in the first place, so there's basically nothing to recover.

More details on tmpfs.

If you're curious how guest account is set up, you can study /usr/sbin/guest-account, which is a shell script used to create/remove a guest account.

Solution 2

Try TestDisk:

sudo apt-get install testdisk

It's an all purpose filesystem recovery tool. To recover deleted files do this:

  1. Open TestDisk in terminal as root:

    sudo testdisk
    
  2. Select the HDD that contains your Ubuntu Partition

  3. Select your Partition Tabel format(Usually Intel but may be EFI on 2TB+ HDDs)

  4. Select "Analyse-->Quick Search"

  5. Once it finishes scanning select your Ubuntu Partition and then press P

  6. Browse to the Home Folder and see if you can find the deleted files and if so use c to copy them to a safe location

  7. Now press q continuously to leave TestDisk safely.

EDIT: I just retried this and it doesn't seem TestDisk can find deleted folders, I'll double check though.

Share:
10,512

Related videos on Youtube

Sandy
Author by

Sandy

Updated on September 18, 2022

Comments

  • Sandy
    Sandy over 1 year

    I have Ubuntu 12.10 and was using guest account. I downloaded some files on desktop and shutdown my m/c after use. Now today when I logged in to guest account to copy those files but surprisingly those files were gone and desktop was clear. I guess ubuntu deletes all files from guest account on shutdown.

    Can you please guide me to recover those lost files.

    Thanks

    • Sam
      Sam over 11 years
      Yes, ubuntu deletes all files from the guest account on reboot, and i dont think that there is any easy way to recover those
    • user68186
      user68186 over 11 years
      This is how Ubuntu guest account works, so that one get cannot see what the other guest downloaded. if you use the guest account, copy the files you need in an USB drive before you log off.
    • Sandy
      Sandy over 11 years
      Actually I didn't knew about this fact. I will keep it in mind or better I will disable guest account.
  • japzone
    japzone over 11 years
    Sergey has reminded me that the Guest account is not stored on Disk so recovery by any means, even my above method, will most likely not work. Sorry.