Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Messed File Permissions/ is it necessary to reinstall?

  1. #11
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Messed File Permissions/ is it necessary to reinstall?

    Quote Originally Posted by kendoori View Post
    Assuming I don't upgrade, but install fresh, can you describe the steps I would take that would allow me to restore my current applications and settings?
    If you have already created a separate home partition and designate that partition as your /home partition in the new install you will retain lots of your settings, such as configuration settings for the panels, shortcuts, etc.

    You would not retain settings for which you normally have to use admin rights to change, such as wireless settings. You could make a copy of the /etc folder, which contains some "root" configuration files that you may be able to copy to the new system (do not try to replace the new /etc with the old /etc, however!).

    If you have saved the Synaptic list via the Save Markings option, on the new system you would use the "Read markings" option in the same section of Synaptic, telling it to use the list you created and saved from your old system.
    Back to Xorg...

    Retired.

  2. #12
    Join Date
    May 2009
    Location
    Wilton, CT
    Beans
    190
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Messed File Permissions/ is it necessary to reinstall?

    So, I've created a separate home partition on 9.04 (sda4), and am ready to do a clean install of 9.10 that I would like to take advantage of this home partition. I've downloaded the alternate installer CD, I assume that I will boot from the CD, then select "Install," rather than other try LiveCD options. At what point in the install process would I be able to point to this "home" partition?

    Also, should I be concerned that the install will screw up my existing GRUB settings, given that I'm dual booting with XP?

  3. #13
    Join Date
    Dec 2008
    Location
    Baroda, India
    Beans
    112
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Messed File Permissions/ is it necessary to reinstall?

    So you have solved the problem it seems, there is no option during the installation to point it to the home folder, though there are settings to import data from windows my documents folder and user accounts.
    Tusker's Ubuntu Machine
    Nonsense - the Sense within

  4. #14
    Join Date
    Dec 2008
    Location
    South Australia
    Beans
    34
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Messed File Permissions/ is it necessary to reinstall?

    Quote Originally Posted by suniyo View Post
    ... there is no option during the installation to point it to the home folder ...

    Having reinstalled 9.10 so many times, it is possible to recognise your home partition during the partitioning section if you choose 'manual' partitioning.

    Psychocat's site gives comprehensive instructions at: http://www.psychocats.net/ubuntu/installseparatehome

    All the best,
    Hakim

  5. #15
    Join Date
    Dec 2008
    Location
    Baroda, India
    Beans
    112
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Messed File Permissions/ is it necessary to reinstall?

    Quote Originally Posted by hakimoerton View Post
    Having reinstalled 9.10 so many times, it is possible to recognise your home partition during the partitioning section if you choose 'manual' partitioning.

    Psychocat's site gives comprehensive instructions at: http://www.psychocats.net/ubuntu/installseparatehome

    All the best,
    Hakim

    Problem is already solved, so it is irrelevent now. reinstallled the app again.
    Tusker's Ubuntu Machine
    Nonsense - the Sense within

  6. #16
    Join Date
    Nov 2011
    Beans
    2

    Re: Messed File Permissions/ is it necessary to reinstall?

    No drs305, it is possible to come back from this messy situation without reinstalling your system. You only need to install a new system elsewhere and restore the permissions from there.

    Here is how I did.

    I ran again the same kind on issue (some bug in a script I was writing) and solved it, but you may need to ask some expert's help, if you're not one. In any case, be very cautuous!

    First, my situation was easier to solve because I had a dual boot system (ubuntu and my former fedora install). Anyway, running the OS from a CD/DVD, or an USB key should do the same thing.

    MPOINT=/mount/ubuntu

    First I mounted my file systems like this (don't forget to create the mount points): mount /dev/ubuntu/root $MPOINT mount /dev/ubuntu/home $MPOINT/home

    Then I ran the following command (my issue was only in a few - critical - directories) to copy the permissions on from the running system to the messy one (in fact, in my case, I installed an ubuntu system in Virtual Box under fedora and got the permissions there):

    Code:
    find /etc /usr /bin -exec stat --format "chmod -h %a ${MPOINT}%n" {} \; > /tmp/restoreperms.sh
    And then I ran the restoreperms.sh script.

    I was able again to boot on ubuntu.

    The content of restoreperms.sh will be something like:

    Code:
    (...)
    chmod -h 755 /mount/ubuntu//etc/ppp
    chmod -h 755 /mount/ubuntu//etc/ppp/ipv6-up
    chmod -h 2750 /mount/ubuntu//etc/ppp/peers
    chmod -h 640 /mount/ubuntu//etc/ppp/peers/provider
    chmod -h 755 /mount/ubuntu//etc/ppp/ipv6-up.d
    chmod -h 777 /mount/ubuntu//etc/ppp/resolv.conf
    (...)
    I didn't test it but it must work for owners and owner groups too. Something like:

    Code:
    find /etc /usr /bin -exec stat --format '[ ! -L {} ] && chown %U:%G ${MPOINT}%n' {} \; > /tmp/restoreperms.sh
    Result:

    Code:
    (...)
    [ ! -L /mount/ubuntu//etc/obex-data-server/imaging_capabilities.xml ] && chown root:root /mount/ubuntu//etc/obex-data-server/imaging_capabilities.xml
    [ ! -L /mount/ubuntu//etc/obex-data-server/capability.xml ] && chown root:root /mount/ubuntu//etc/obex-data-server/capability.xml
    [ ! -L /mount/ubuntu//etc/ppp ] && chown root:dip /mount/ubuntu//etc/ppp
    [ ! -L /mount/ubuntu//etc/ppp/ipv6-up ] && chown root:root /mount/ubuntu//etc/ppp/ipv6-up
    [ ! -L /mount/ubuntu//etc/ppp/peers ] && chown root:dip /mount/ubuntu//etc/ppp/peers
    [ ! -L /mount/ubuntu//etc/ppp/peers/provider ] && chown root:dip /mount/ubuntu//etc/ppp/peers/provider
    [ ! -L /mount/ubuntu//etc/ppp/ipv6-up.d ] && chown root:root /mount/ubuntu//etc/ppp/ipv6-up.d
    [ ! -L /mount/ubuntu//etc/ppp/resolv.conf ] && chown root:root /mount/ubuntu//etc/ppp/resolv.conf
    (...)
    Of course, you have to take care here, that the UID and GID are the same on both systems, but for the system related users and groups, this shouldn't be an issue.

    Rk:

    An important thing for this is to keep an install disk synchronized with the version you are using, or at least work with the current ubuntu version (may work even with diffenrent version but better to keep all the chances on your side).

    Now, I have this commands in a cronjob, running every day (could be weeks) in order to keep that information. It will make the solution easier next time but, of course, as I have this now, it will never happen again. Something like this:

    Code:
        0 12 * * * /usr/bin/find / -exec /usr/bin/stat --format="[ ! -L {} ] && /bin/chmod %a %n" {} \; -exec /usr/bin/stat --format="/bin/chown -h %U:%G %n" {} \; |/bin/bzip2 -c > /tmp/restore_fileperms.$(/bin/date +%w).sh.bz2

  7. #17
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Messed File Permissions/ is it necessary to reinstall?

    Closed, please don't bump old threads.

Page 2 of 2 FirstFirst 12

Tags for this Thread

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
  •