Broken system after chmod -R 644 /

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I use debian jessie and I have done one of those bad mistakes and broke my system with a mistyped command and worse mistakes that follow in such situations.



Trying to fix some permissions I mistakenly used chmod recursively on root folder:



# chmod -R 0644 /


and then realizing immediately I rushed in doing something to stop it but the system was frozen and the worse mistake was the hard powering off the system.



Now I think I have some user manager problem and after booting with some "failed to start service" messages I don't have the Gnome user login and I can't also login in console. And this is what that flashes several times and then stays on screen:



[ ok ] Created slice user-113.slice
Starting user manager for UID 113...
[ ok ] Started user manager for UID 113
[ ok ] Stopped user manager for UID 113
[ ok ] Removed slice user-113.slice









share|improve this question



















  • 1





    An article how to reset the permissions on /var only: blog.matoski.com/articles/… - I think a complete re-install is faster and cleaner.

    – ott--
    Apr 7 '15 at 3:34















1















I use debian jessie and I have done one of those bad mistakes and broke my system with a mistyped command and worse mistakes that follow in such situations.



Trying to fix some permissions I mistakenly used chmod recursively on root folder:



# chmod -R 0644 /


and then realizing immediately I rushed in doing something to stop it but the system was frozen and the worse mistake was the hard powering off the system.



Now I think I have some user manager problem and after booting with some "failed to start service" messages I don't have the Gnome user login and I can't also login in console. And this is what that flashes several times and then stays on screen:



[ ok ] Created slice user-113.slice
Starting user manager for UID 113...
[ ok ] Started user manager for UID 113
[ ok ] Stopped user manager for UID 113
[ ok ] Removed slice user-113.slice









share|improve this question



















  • 1





    An article how to reset the permissions on /var only: blog.matoski.com/articles/… - I think a complete re-install is faster and cleaner.

    – ott--
    Apr 7 '15 at 3:34













1












1








1








I use debian jessie and I have done one of those bad mistakes and broke my system with a mistyped command and worse mistakes that follow in such situations.



Trying to fix some permissions I mistakenly used chmod recursively on root folder:



# chmod -R 0644 /


and then realizing immediately I rushed in doing something to stop it but the system was frozen and the worse mistake was the hard powering off the system.



Now I think I have some user manager problem and after booting with some "failed to start service" messages I don't have the Gnome user login and I can't also login in console. And this is what that flashes several times and then stays on screen:



[ ok ] Created slice user-113.slice
Starting user manager for UID 113...
[ ok ] Started user manager for UID 113
[ ok ] Stopped user manager for UID 113
[ ok ] Removed slice user-113.slice









share|improve this question
















I use debian jessie and I have done one of those bad mistakes and broke my system with a mistyped command and worse mistakes that follow in such situations.



Trying to fix some permissions I mistakenly used chmod recursively on root folder:



# chmod -R 0644 /


and then realizing immediately I rushed in doing something to stop it but the system was frozen and the worse mistake was the hard powering off the system.



Now I think I have some user manager problem and after booting with some "failed to start service" messages I don't have the Gnome user login and I can't also login in console. And this is what that flashes several times and then stays on screen:



[ ok ] Created slice user-113.slice
Starting user manager for UID 113...
[ ok ] Started user manager for UID 113
[ ok ] Stopped user manager for UID 113
[ ok ] Removed slice user-113.slice






permissions system-recovery






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 18 '18 at 9:38









Rui F Ribeiro

41.6k1483141




41.6k1483141










asked Apr 6 '15 at 17:24









jaljal

2731210




2731210







  • 1





    An article how to reset the permissions on /var only: blog.matoski.com/articles/… - I think a complete re-install is faster and cleaner.

    – ott--
    Apr 7 '15 at 3:34












  • 1





    An article how to reset the permissions on /var only: blog.matoski.com/articles/… - I think a complete re-install is faster and cleaner.

    – ott--
    Apr 7 '15 at 3:34







1




1





An article how to reset the permissions on /var only: blog.matoski.com/articles/… - I think a complete re-install is faster and cleaner.

– ott--
Apr 7 '15 at 3:34





An article how to reset the permissions on /var only: blog.matoski.com/articles/… - I think a complete re-install is faster and cleaner.

– ott--
Apr 7 '15 at 3:34










2 Answers
2






active

oldest

votes


















1














The good news is that all your data is still there. The mixed news is that your system installation may or may not be recoverable — it depends where chmod stopped.



You will need to boot into a rescue system to repair it. From the rescue system, mount your broken installation somewhere, say /mnt. Issue the following commands:



chmod 755 /mnt
find /mnt -type d -perm 644 >/mnt/bad-permissions
find /mnt -type d -exec chmod 755 +


The first find command saves a record of directories with bad permissions into a file. The purpose is to see where permissions have been modified. The second find command changes all directories to be publicly accessible.



You now have a system where all directories listed in /mnt/bad-permissions and all files in these directories are world-readable. Furthermore files in these directories are not executable. Depending on which files were affected, this may be easily repairable or not. See Wrongly set chmod / 777. Problems? for what you can try to get the system functional, to which you should add



chmod a+x /bin/* /sbin/* /usr/bin/* /usr/sbin/* /lib*/ld-*


But even if you manage to get something working, there's a high risk that some permissions are still wrong, so I recommend reinstalling a new system, then restoring your data. How do I replicate installed package selections from one Debian system to another? (Debian Wheezy) should help.






share|improve this answer
































    3














    You remove the execution permission on the files. Moreover you give read permission to the world on some files. Both in combination do not allow you to login. My best advise is to back your files with some live CD and reinstall






    share|improve this answer























    • Thanks for your answer Romeo. So do you mean that there's no way to recover and I need a fresh installation? Isn't there a way to fix the permissions?

      – jal
      Apr 6 '15 at 17:43











    • If you have second system with the same installation you can try to get permissions of all system files. But this is a lot of work. Also you can recover the system from backup (if you have one)

      – Romeo Ninov
      Apr 6 '15 at 17:46










    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f194644%2fbroken-system-after-chmod-r-644%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    The good news is that all your data is still there. The mixed news is that your system installation may or may not be recoverable — it depends where chmod stopped.



    You will need to boot into a rescue system to repair it. From the rescue system, mount your broken installation somewhere, say /mnt. Issue the following commands:



    chmod 755 /mnt
    find /mnt -type d -perm 644 >/mnt/bad-permissions
    find /mnt -type d -exec chmod 755 +


    The first find command saves a record of directories with bad permissions into a file. The purpose is to see where permissions have been modified. The second find command changes all directories to be publicly accessible.



    You now have a system where all directories listed in /mnt/bad-permissions and all files in these directories are world-readable. Furthermore files in these directories are not executable. Depending on which files were affected, this may be easily repairable or not. See Wrongly set chmod / 777. Problems? for what you can try to get the system functional, to which you should add



    chmod a+x /bin/* /sbin/* /usr/bin/* /usr/sbin/* /lib*/ld-*


    But even if you manage to get something working, there's a high risk that some permissions are still wrong, so I recommend reinstalling a new system, then restoring your data. How do I replicate installed package selections from one Debian system to another? (Debian Wheezy) should help.






    share|improve this answer





























      1














      The good news is that all your data is still there. The mixed news is that your system installation may or may not be recoverable — it depends where chmod stopped.



      You will need to boot into a rescue system to repair it. From the rescue system, mount your broken installation somewhere, say /mnt. Issue the following commands:



      chmod 755 /mnt
      find /mnt -type d -perm 644 >/mnt/bad-permissions
      find /mnt -type d -exec chmod 755 +


      The first find command saves a record of directories with bad permissions into a file. The purpose is to see where permissions have been modified. The second find command changes all directories to be publicly accessible.



      You now have a system where all directories listed in /mnt/bad-permissions and all files in these directories are world-readable. Furthermore files in these directories are not executable. Depending on which files were affected, this may be easily repairable or not. See Wrongly set chmod / 777. Problems? for what you can try to get the system functional, to which you should add



      chmod a+x /bin/* /sbin/* /usr/bin/* /usr/sbin/* /lib*/ld-*


      But even if you manage to get something working, there's a high risk that some permissions are still wrong, so I recommend reinstalling a new system, then restoring your data. How do I replicate installed package selections from one Debian system to another? (Debian Wheezy) should help.






      share|improve this answer



























        1












        1








        1







        The good news is that all your data is still there. The mixed news is that your system installation may or may not be recoverable — it depends where chmod stopped.



        You will need to boot into a rescue system to repair it. From the rescue system, mount your broken installation somewhere, say /mnt. Issue the following commands:



        chmod 755 /mnt
        find /mnt -type d -perm 644 >/mnt/bad-permissions
        find /mnt -type d -exec chmod 755 +


        The first find command saves a record of directories with bad permissions into a file. The purpose is to see where permissions have been modified. The second find command changes all directories to be publicly accessible.



        You now have a system where all directories listed in /mnt/bad-permissions and all files in these directories are world-readable. Furthermore files in these directories are not executable. Depending on which files were affected, this may be easily repairable or not. See Wrongly set chmod / 777. Problems? for what you can try to get the system functional, to which you should add



        chmod a+x /bin/* /sbin/* /usr/bin/* /usr/sbin/* /lib*/ld-*


        But even if you manage to get something working, there's a high risk that some permissions are still wrong, so I recommend reinstalling a new system, then restoring your data. How do I replicate installed package selections from one Debian system to another? (Debian Wheezy) should help.






        share|improve this answer















        The good news is that all your data is still there. The mixed news is that your system installation may or may not be recoverable — it depends where chmod stopped.



        You will need to boot into a rescue system to repair it. From the rescue system, mount your broken installation somewhere, say /mnt. Issue the following commands:



        chmod 755 /mnt
        find /mnt -type d -perm 644 >/mnt/bad-permissions
        find /mnt -type d -exec chmod 755 +


        The first find command saves a record of directories with bad permissions into a file. The purpose is to see where permissions have been modified. The second find command changes all directories to be publicly accessible.



        You now have a system where all directories listed in /mnt/bad-permissions and all files in these directories are world-readable. Furthermore files in these directories are not executable. Depending on which files were affected, this may be easily repairable or not. See Wrongly set chmod / 777. Problems? for what you can try to get the system functional, to which you should add



        chmod a+x /bin/* /sbin/* /usr/bin/* /usr/sbin/* /lib*/ld-*


        But even if you manage to get something working, there's a high risk that some permissions are still wrong, so I recommend reinstalling a new system, then restoring your data. How do I replicate installed package selections from one Debian system to another? (Debian Wheezy) should help.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 13 '17 at 12:36









        Community

        1




        1










        answered Apr 8 '15 at 0:34









        GillesGilles

        543k12811011619




        543k12811011619























            3














            You remove the execution permission on the files. Moreover you give read permission to the world on some files. Both in combination do not allow you to login. My best advise is to back your files with some live CD and reinstall






            share|improve this answer























            • Thanks for your answer Romeo. So do you mean that there's no way to recover and I need a fresh installation? Isn't there a way to fix the permissions?

              – jal
              Apr 6 '15 at 17:43











            • If you have second system with the same installation you can try to get permissions of all system files. But this is a lot of work. Also you can recover the system from backup (if you have one)

              – Romeo Ninov
              Apr 6 '15 at 17:46















            3














            You remove the execution permission on the files. Moreover you give read permission to the world on some files. Both in combination do not allow you to login. My best advise is to back your files with some live CD and reinstall






            share|improve this answer























            • Thanks for your answer Romeo. So do you mean that there's no way to recover and I need a fresh installation? Isn't there a way to fix the permissions?

              – jal
              Apr 6 '15 at 17:43











            • If you have second system with the same installation you can try to get permissions of all system files. But this is a lot of work. Also you can recover the system from backup (if you have one)

              – Romeo Ninov
              Apr 6 '15 at 17:46













            3












            3








            3







            You remove the execution permission on the files. Moreover you give read permission to the world on some files. Both in combination do not allow you to login. My best advise is to back your files with some live CD and reinstall






            share|improve this answer













            You remove the execution permission on the files. Moreover you give read permission to the world on some files. Both in combination do not allow you to login. My best advise is to back your files with some live CD and reinstall







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 6 '15 at 17:32









            Romeo NinovRomeo Ninov

            6,79432129




            6,79432129












            • Thanks for your answer Romeo. So do you mean that there's no way to recover and I need a fresh installation? Isn't there a way to fix the permissions?

              – jal
              Apr 6 '15 at 17:43











            • If you have second system with the same installation you can try to get permissions of all system files. But this is a lot of work. Also you can recover the system from backup (if you have one)

              – Romeo Ninov
              Apr 6 '15 at 17:46

















            • Thanks for your answer Romeo. So do you mean that there's no way to recover and I need a fresh installation? Isn't there a way to fix the permissions?

              – jal
              Apr 6 '15 at 17:43











            • If you have second system with the same installation you can try to get permissions of all system files. But this is a lot of work. Also you can recover the system from backup (if you have one)

              – Romeo Ninov
              Apr 6 '15 at 17:46
















            Thanks for your answer Romeo. So do you mean that there's no way to recover and I need a fresh installation? Isn't there a way to fix the permissions?

            – jal
            Apr 6 '15 at 17:43





            Thanks for your answer Romeo. So do you mean that there's no way to recover and I need a fresh installation? Isn't there a way to fix the permissions?

            – jal
            Apr 6 '15 at 17:43













            If you have second system with the same installation you can try to get permissions of all system files. But this is a lot of work. Also you can recover the system from backup (if you have one)

            – Romeo Ninov
            Apr 6 '15 at 17:46





            If you have second system with the same installation you can try to get permissions of all system files. But this is a lot of work. Also you can recover the system from backup (if you have one)

            – Romeo Ninov
            Apr 6 '15 at 17:46

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f194644%2fbroken-system-after-chmod-r-644%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?