Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an Ubuntu 9.10 netbook. It has always run great. Two days ago, I was running as root for a while (~30), and when I moved back to my user account (only other account on this machine), all the commands in ~/bin stopped working.

If I try ls, it comes up with "cannot execute binary file". Same with ln, mv, mkdir, clear, cp, etc. They all run as root (which makes sense, different files), but I have no idea why this happened. I don't want to stay as root to move around easily. Any idea?

share|improve this question

migrated from serverfault.com Apr 27 '10 at 4:22

This question came from our site for professional system and network administrators.

    
Did you copy or install something? Or do something while logged in as root that might have allowed unauthorized access to your system that was able to copy or install something? As root, in Bash, try type -a ls then try it as your user and compare. Then do ls -bil $(type -afp ls) as each and compare. –  Dennis Williamson Apr 27 '10 at 2:36
    
how did you switch back to the other user? did you su <user>, su - user, or just logout form the root session? –  warren Apr 27 '10 at 2:53
3  
Try becoming root and do a "history | more" and perhaps you'll be able to see what happened. –  Chris Nava Apr 27 '10 at 2:54
    
What are the rights on those files ? What is the value of your $PATH environment variable ? –  slubman Apr 27 '10 at 8:28

2 Answers 2

Check your path variable in your user profile. /bin should be there.

share|improve this answer

Are you saying you have a copy of your system commands in $HOME/bin? It sounds like a very weird idea. Anyway, "cannot execute binary file" can mean that the file in path is for wrong architecture. Is it a network share, or have you copied binaries from some other computer?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.