Results 1 to 7 of 7

Thread: Accidently changed access to all folders

  1. #1
    Join Date
    Aug 2024
    Beans
    2

    Accidently changed access to all folders

    I've broke my system. What i did is:
    $ sudo find /. f -print0 | xargs -0 sudo chmod 0644
    sudo: unable to execute /usr/bin/chmod: Argument list too long
    sudo: unable to execute /usr/bin/chmod: Argument list too long
    sudo: unable to execute /usr/bin/chmod: Argument list too long
    sudo: unable to execute /usr/bin/chmod: Argument list too long
    chmod: changing permissions of '/./sys/fs/cgroup': Read-only file system
    xargs: sudo: Permission denied

    So i think problem is that all folders now lost +X access

    Now i cant use it. Even cant start recovery. What can i do to fix it ?

    Thanks
    Last edited by railrash; August 6th, 2024 at 10:55 AM.

  2. #2
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Accidently changed access to all folders

    Unfortunately, this is not the sort of thing that can be "fixed" in any practical way. To do so would require that one know exactly what permissions are required for each system file used by the OS. There are thousands of those. Not to mention what permissions are appropriate for your data, etc.

    So let me ask you the hard question first: Have you been in the habit of backing up your important data?

    (Don't feel foolish. This is the sort of mistake we have all made at one time or another!)
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  3. #3
    Join Date
    Aug 2024
    Beans
    2

    Re: Accidently changed access to all folders

    Yes I have backup. I also tried to run sudo find /. f -print0 | xargs -0 sudo chmod 0755 from recovery disk, but it didnt help ...

  4. #4
    Join Date
    Mar 2010
    Location
    /home
    Beans
    9,688
    Distro
    Xubuntu

    Re: Accidently changed access to all folders

    I would be curious to understand why you ran that command in the first place.

    Surely you realized what it was going to do?

    As an experiment? Maybe in a VM.

    On a live working system? Not a very good idea.

    You will almost certainly need to reinstall and restore your backups.

  5. #5
    currentshaft is offline Oops! My Coffee Cup is empty.
    Join Date
    May 2024
    Beans
    Hidden!

    Re: Accidently changed access to all folders

    .
    Last edited by currentshaft; 4 Weeks Ago at 12:34 AM.

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Accidently changed access to all folders

    Quote Originally Posted by railrash View Post
    Now i cant use it. Even cant start recovery. What can i do to fix it ?
    Permissions and ownership matter. Reinstall. That's the fix. There isn't any quick fix that can be completed in 30 minutes like a reinstall will. Then restore your backup data and in less than 1 hour, you'll be going again, having learned an important lesson.

    BTW, stop abusing sudo.

  7. #7
    Join Date
    May 2010
    Beans
    3,443

    Re: Accidently changed access to all folders

    Reinstall, restore casual user data from backups. Access and permissions is set for a reason. Steamrolling it as you did breaks the system. Unless you want to boot a VM on another system and set each and every single file as it should be which would take (more than likely) years.

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
  •