Announcement

Collapse
No announcement yet.

Changed File Permissions On /Bin - Now Kubuntu Is Frozen [RESOLVED]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changed File Permissions On /Bin - Now Kubuntu Is Frozen [RESOLVED]


    I was trying to set file permissions and directory permissions and managed to lock myself out of Kubuntu. Actually, Kubuntu will not even boot up other than in safe mode. I'm pretty sure it all happened when I changed the permissions on the /bin and /usr directories from what ever they were to "700".

    The affect was immediate. The computer just locked up. I have rebooted the machine into safe mode and tried running the command "sudo chmod bin 755" but was returned this error:

    root@closet:/# sudo chmod bin 755
    sudo: can't open /etc/sudoers: permission denied
    rot@closet;/# Exim configuration error in line 622 of /var/lib/exim4/config.autogenerated:
    user mail was not found
    How do I undo what I did?

    Thanks and errrrr....lesson learned.
    sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

    #2
    Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

    Don't use sudo with the command. In Recovery Mode (Single User) you are already running as root. That's what the # at the end of the prompt denotes.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

      This is what I get without "sudo"
      root@closet:/# chmod bin 755
      chmod: invalid mode: 'bin"
      try chmod --help for more information
      Thanks!
      sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

      Comment


        #4
        Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

        It's:
        Code:
        chmod 755 bin
        not:
        Code:
        chmod bin 755
        'bin' is not a valid format for permissions mode -> error

        Comment


          #5
          Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

          Well, that's what happens when you try to type before coffee. Okay, I'll give this a try when I get home tonight.

          Thanks!
          sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

          Comment


            #6
            Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

            I executed the commands using the above syntax and they executed without error. However, I'm still locked out. If I wait long enough I finally get to the Kubuntu login screen. I put in my credentials then got a pop up error box saying:
            bash: /etc/bash.bashrc: Permission denied
            I have no name!@closet:~$
            I can not recall which folders I initially changed so there may be another folder or file whose permission in screwed up. >
            Two questions:

            (1) I used chmod 755 bin on /bin and /usr and /etc. I then went back again and used "chmod -R 755 bin" and also the same on /usr. This took a few minutes to complete but did complete without errors. Did I do this correctly?

            (2) What should the /bin, /usr, /etc, /<any_other_folder_that_may_be_causing_problems> permissions be set to? Is 755 correct?

            Thanks!
            sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

            Comment


              #7
              Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

              Changing permissions (or ownerships) recursively (with -R option) on system directories is dangerous and can lead to severe headaches, as although most of the directories should be 755, subdirectories and files often are something else entirely (some executables need to be set SUID, for example, and some directories and files have limited permissions for security reasons).

              You may have mangled the system beyond 'easy' repair, but of course you *may* get the system up by repairing file permissions manually (but reinstalling is probably the way of least resistance).

              Comment


                #8
                Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen


                Ouch! I was afraid of that. I'll try changing all the directories to 755 and see if that helps. I may have already mangled everything. As a last ditch effort, I'll change everything to 766 and see what that does.

                You know, Kubuntu should not let critical permissions be changed without some type of warning! I had no idea that I was about to screw up my system. I know, I know...I was under "sudo" but even then, I should have gotten a warning stating that harm could be done. Somethng. Anything.

                Someone could easily write malicious code to change folder permissions which would disable a computer. Ok....I'll try a few more things before a fresh install.

                I'll post back the results.

                Mike
                sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                Comment


                  #9
                  Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

                  Okay, I'm making a little progress here. I booted into safe mode and typed
                  cd /
                  to get to the top level of the directory. Then typing
                  ls -l
                  showed the bin, usr, etc, home, and other directories. I then changed the permissions to 755 for every directory located under "/".

                  I rebooted and got all the way to the login screen and typed in my credentials. This time I did not get an error. Actually, I did not get anything at all. I typed in my username and password, the screen went blank for about a second then returned to the login page. I typed in my credentials again and the same thing happened. No errors. It seems like Kubuntu can't find what it is looking for.

                  So, what file is Kubuntu hunting for when I login and what should the permissions be set to on that file?

                  Thanks!

                  Mike
                  sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                  Comment


                    #10
                    Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

                    Originally posted by mechanism

                    I typed in my username and password, the screen went blank for about a second then returned to the login page. I typed in my credentials again and the same thing happened.
                    This "login loop" phenomenon has been found to be caused by several different conditions:

                    1. Full filesystem

                    2. Root permissions on some part(s) of the /home settings files/folders

                    3. Broken video driver (has to be re-installed)

                    4. Recently, a bug in language-pack-kde-en.

                    I'll speculate that your most likely problem is #2. If, in text mode, you can change directory to your /home directory, and delete the hidden ".kde" folder, that is often the culprit, and then restart the system and try a normal login. So that would be:

                    Code:
                    cd /home
                    rm -rf .kde
                    sudo shutdown now -r
                    Doing this will cost you your existing desktop settings -- a new .kde folder will be created at your next successful login and you'll have to configure the desktop and KDE behavior again. Good luck with it.

                    Comment


                      #11
                      Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

                      Thank you. I'll give that a try tonight when I get home.

                      Mike
                      sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                      Comment


                        #12
                        Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

                        Well, that did not work. I still have that cycling login screen. I sign in, screen goes blank for about one second, then back to the login screen. I have three users setup at login and no matter which one I pick, the same thing happens.

                        Can you think of anything else I should try before I go for the reinstall?

                        Mike
                        sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                        Comment


                          #13
                          Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

                          Just in case of a situation just like the one I am in, I did make an image of my sda2 partition just last week so I have the full install already backed up. I used Partimage to make a file. Because my storage device is FAT32 the max file size is 4.0 Gigs so the Partimage backup is actually several different files listed as below

                          [quote]sda2.pmg.gz.000
                          sda2.pmg.gz.001
                          sda2.pmg.gz.002
                          etc.../quote]

                          Do I just select the ".000" file first? Will Partimage understand that the total file is broken up and retrieve each file in order?

                          Thanks!

                          Mike
                          sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                          Comment


                            #14
                            Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

                            I did this for kde4 and actually deleted .kde4 from home (logged into kde3) and I still got the issue. I assume that I should not delete .kde if I am only having the issue with kde4. I did a sudo chmod 777 -R command on the .kde4 folder as well. Perhaps an update will fix it soon.

                            Originally posted by dibl
                            Originally posted by mechanism

                            I typed in my username and password, the screen went blank for about a second then returned to the login page. I typed in my credentials again and the same thing happened.
                            This "login loop" phenomenon has been found to be caused by several different conditions:

                            1. Full filesystem

                            2. Root permissions on some part(s) of the /home settings files/folders

                            3. Broken video driver (has to be re-installed)

                            4. Recently, a bug in language-pack-kde-en.

                            I'll speculate that your most likely problem is #2. If, in text mode, you can change directory to your /home directory, and delete the hidden ".kde" folder, that is often the culprit, and then restart the system and try a normal login. So that would be:

                            Code:
                            cd /home
                            rm -rf .kde
                            sudo shutdown now -r
                            Doing this will cost you your existing desktop settings -- a new .kde folder will be created at your next successful login and you'll have to configure the desktop and KDE behavior again. Good luck with it.

                            Comment


                              #15
                              Re: Changed File Permissions On /Bin - Now Kubuntu Is Frozen

                              Just to update the thread - I never did recover from the permission issue. Thankfully, I had made a backup image of my Linux partition which I restored in just a couple of hours and was back online. Thank the Lord for Partimage!

                              Take my advice, If you've not made a backup image yet then do so now. Do it now! Now! Why are you still reading this? What are you waiting on? Now! Get moving! Now, now, now!

                              Thanks!

                              Mike
                              sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

                              Comment

                              Working...
                              X