Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: home turned into executable

  1. #1
    Join Date
    Jul 2012
    Beans
    13

    home turned into executable

    hey all i have had a major system screw up and i dont know how to fix it.

    I was running xubuntu13.10 and had a problem on the 25th boot where it wants to check your filesystem it wouldnt do it so i skipped. On the next reboot i was w armly welcomed to the grub rescue page. Since then i have tried a couple things to get me back into the system

    1. booted up my live usb of xubuntu 12.04 tried boot-repair. rebooted nothing
    2. did the grub resuce method

    set root=(hd0,1) etc etc

    with this it got me all the way into a xubunut@xubuntu terminal, not what i wanted but hey i as further to getting my system back. Tried all sorts of things here
    1.reinstalling grub to apt-get update && apt-get upgrade didnt work
    2 grub-install didnt work
    3 this one didnt bring up xubuntu@xubuntu bu initfrms box instead so tried mount and chroot to get into system big fail

    so now as i was thinking ok i give up. The i went to the live usb again and was about to dump my home directory to and external hdd so i can pick what i wanted from it and hopefully save my songs, photos , conky config(took one hella time doing) only to find out that it was an executable and not folder ?? see picture. I was wondering what the hell happened to it and will i be able to get it back to a folder.

    edit here:-


    Puling up ls -l i get this for home

    -rw-rw-rw- 1 root root 17024 Feb 7 2013 home

    Does this have anything to do with it as i am seeing that most directorys have a d where the first dash . So how do i go about getting that back?







    Last edited by mut3d87; September 27th, 2013 at 12:42 PM. Reason: more info

  2. #2
    Join Date
    Jul 2012
    Beans
    13

    restore d in front of -rw-rw-rw-

    im trying to change my folder which has turned into an executable following a e2fsck back to a folder and need to know how to do this.

    After using ls -l i get the following

    -rw-rw-rw- 1 root root 17024

    Now from what i read i need to restore the d before the -rw-rw-rw-

    my question is what chmod command can i do to make this happen?

  3. #3
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,883
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: home turned into executable

    Quote Originally Posted by mut3d87 View Post
    Puling up ls -l i get this for home

    -rw-rw-rw- 1 root root 17024 Feb 7 2013 home
    Have you tried enabling "Show Hidden files" (or whatever similar option you have) to see it is not converted (or moved) to some hidden folder? Least possible thing, I know, but just to make sure.

    I tried to find similar cases with possibly some fix and only this one came up in my search that is similar to your case : http://superuser.com/questions/40147...change-it-back

    Based on the results and some personal understanding, I think your only hope is some data recovery software, and testdisk is on top of my list of recommendations.

    Doing another fsck on the partition may help, but it may also make the recovery more difficult by making changes to the file-system. So I would prefer to scan with testdisk first.

    Try booting into live session, get connected to internet and install testdisk with -
    Code:
    sudo apt-get update
    sudo apt-get install testdisk
    Then run it with-
    Code:
    sudo testdisk
    and follow the instructions here to see if it can find your lost home/data : www.cgsecurity.org/wiki/TestDisk_Step_By_Step

    As a precaution, the first thing I would do is to stop using the partition. For using recovery tools like above, I would use a live media and would only use the partition in read-only mode.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  4. #4
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,310
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: restore d in front of -rw-rw-rw-

    chmod cannot change a file into a directory. The only thing I can imagine to have happened is that somehow the directory was replaced by a file with the same name. Try file recovery software. See your other thread: http://ubuntuforums.org/showthread.p...0#post12800440

    Maybe someone very clever with the internals of the file system knows how to fix this manually by manipulating some flags belonging to that file, but I'm not that person.

  5. #5
    Join Date
    Jul 2012
    Beans
    13

    Re: restore d in front of -rw-rw-rw-

    Quote Originally Posted by Impavidus View Post
    chmod cannot change a file into a directory. The only thing I can imagine to have happened is that somehow the directory was replaced by a file with the same name. Try file recovery software. See your other thread: http://ubuntuforums.org/showthread.p...0#post12800440

    Maybe someone very clever with the internals of the file system knows how to fix this manually by manipulating some flags belonging to that file, but I'm not that person.

    Thanks i have just tried the other thread and had no luck, no hidden/dleted files were found.

    Manipulating the filesystem seems the only way forward. Now if we could just get the attention of someone really clever to help.

  6. #6
    Join Date
    Jul 2012
    Beans
    13

    Re: home turned into executable

    hi thanks for the response unfortunately testdisk has no hidden or deleted folders only shows that one file.

    I cant even get to files located in that directory which is the part im most annoyed about thanks for helping.

  7. #7
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,883
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: home turned into executable

    Did you try "Deeper Search" ? What is the size of the partition on which your Home was/is? And what was the approximate size of the directory?

    If the files 'ever' existed on that partition, then unless they have been overwritten, testdisk should be able to show them to you, even if they are corrupted and irrecoverable.

    Does the current "Available space" on the partition justify the disappeared data? (if a 10 GB folder is gone, is 10 GB added to "available space"?) If not, then maybe the data has been just moved somewhere.

    The last resort in my opinion would be running PhotoRec, which is a part of test disk. It can recover whatever is physically leftover on the partition, but won't recover filenames and directory structure. And most of the 'recovered' data would be corrupt and unusable.
    Last edited by varunendra; September 27th, 2013 at 03:25 PM.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  8. #8
    Join Date
    Jul 2012
    Beans
    13

    Re: home turned into executable

    Quote Originally Posted by varunendra View Post
    Did you try "Deeper Search" ? What is the size of the partition on which your Home was/is? And what was the approximate size of the directory?

    If the files 'ever' existed on that partition, then unless they have been overwritten, testdisk should be able to show them to you, even if they are corrupted and irrecoverable.

    Does the current "Available space" on the partition justify the disappeared data? (if a 10 GB folder is gone, is 10 GB added to "available space"?) If not, then maybe the data has been just moved somewhere.

    The last resort in my opinion would be running PhotoRec, which is a part of test disk. It can recover whatever is physically leftover on the partition, but won't recover filenames and directory structure. And most of the 'recovered' data would be corrupt and unusable.
    No i didnt try a deeper search as the partitions were found autmatically and there was no need to "go deeper" when i selected the drive it took me to the / folder and listed everything you would expect including the the /home directory which still only had -rwx-rwx-rwx- still no d at beginning and no hidden/deleted folder in there.

    The available size is definetely as if the files inside that home directory are still there 280/461GiB 181Gib free looking at Gparted which seems the correct amount. Only i have no way to getting in to it all to verify this.

    Would it be possible to make a folder and somehow trick it to believe it was the original home folder and list everything in that folder?Kind of like merging the 2. That or get the file to become directory gain which from what i gather is near on impossible.
    Last edited by mut3d87; September 27th, 2013 at 03:48 PM.

  9. #9
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,617
    Distro
    Ubuntu Development Release

    Re: home turned into executable

    Threads merged.

    Please don't create multiple threads asking the same question.
    Join us on irc at #ubuntuforums. For web chat see here

    If you believe everything you read, you better not read. ~ Japanese Proverb

    Do not read newspapers on an empty stomach ~ Russian Proverb ~ BrunoLotse

  10. #10
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,617
    Distro
    Ubuntu Development Release

    Re: home turned into executable

    Is there anything in the lost+found on the same partition as your home directory ?
    Join us on irc at #ubuntuforums. For web chat see here

    If you believe everything you read, you better not read. ~ Japanese Proverb

    Do not read newspapers on an empty stomach ~ Russian Proverb ~ BrunoLotse

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •