Results 1 to 5 of 5

Thread: Made a big mistake with chown

  1. #1
    Join Date
    May 2008
    Location
    Canada
    Beans
    215
    Distro
    Xubuntu 16.04 Xenial Xerus

    Made a big mistake with chown

    Mistakenly executed
    Code:
    sudo chown -R ineuw:ineuw /
    forgetting to add the application name for deletion, and changed ownership to a LOT of OS files which shouldn't be changed, before I realized and hit Ctrl-Break. Is there a way to reverse my error?
    Last edited by ineuw; September 10th, 2013 at 03:54 AM.
    # Linux Mint Cinnamon 21.1 as of 2023-06-06 21:17

  2. #2
    Join Date
    Sep 2012
    Location
    United Kingdom
    Beans
    93
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Made a big mistake with chown

    From my experience, it's pretty hard to completely reverse such changes, just like if you was to accidentally execute a dangerous command on / instead of ./

    Most important OS files are owned by root, so I would suggest changing them back as root being the owner.

    However, I can't 100% certain about this. It's really risky and might misbehave the system due to permissions issues, since not all the files are owned by root, for example, a web server like Apache2 would need www-data as its owner.

  3. #3
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Made a big mistake with chown

    You may like to try
    Code:
    sudo chown -R root:root /
    sudo chown -R ineuw:ineuw /home/ineuw
    This will firstly return the root file system, including your home, to root ownership and then return your home to your own ownership though I admit I am not totally sure about its likely success, and may cause problems with ownership of some files in root which have other owners.

  4. #4
    Join Date
    May 2012
    Beans
    248
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Made a big mistake with chown

    Unfortunately your chances of correcting your mistake are incredibly slim. Any changes/updates you make in the future may have issues & you'll never know if it's a config or ownership problem.

    Your best bet is a clean install. Save your /home & any other important data first.

  5. #5
    Join Date
    May 2008
    Location
    Canada
    Beans
    215
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Made a big mistake with chown

    Sadly only a clean install will help as I can't even log in anymore. The data is secure. Thanks for all the replies.
    # Linux Mint Cinnamon 21.1 as of 2023-06-06 21:17

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
  •