Results 1 to 17 of 17
  1. #1
    Join Date
    Feb 2007
    Posts
    325

    Unable read /etc/passwd. /etc/passwd MUST be world readable under UN*X operating sys

    Hello

    i run one bad command :-(

    chmod -R 644 /


    and this command changes all permision in root server
    have any away for fixed all permision in centos?

    because all site take error

    i use of cpanel

    Thanks
    Soon ...
      0 Not allowed!

  2. #2
    Join Date
    Feb 2003
    Location
    Canada
    Posts
    951
    Changing all your permissions back could take forever.

    You'd be better off with a reinstall. It would take less time.
      0 Not allowed!

  3. #3
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,596
    You can try

    rpm --setperms -a

    Which might put things back together

    Rus
    Rus Foster - Director of Cloud @ UK2 Group
    VPS.net - True Cloud Hosting powered by OnApp and HP SANS
    Tel: +447714137805 | Email: rghf@uk2group.com
      0 Not allowed!

  4. #4
    Join Date
    Feb 2007
    Posts
    325
    Thanks
    i run again chmod -R 7777 /

    this is good?
    Soon ...
      0 Not allowed!

  5. #5
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,596
    Nope thats probably made things a lot worse. Now you definitely need a reload
    Rus Foster - Director of Cloud @ UK2 Group
    VPS.net - True Cloud Hosting powered by OnApp and HP SANS
    Tel: +447714137805 | Email: rghf@uk2group.com
      0 Not allowed!

  6. #6
    Join Date
    Apr 2000
    Location
    California
    Posts
    3,051
    Quote Originally Posted by robocap View Post
    Thanks
    i run again chmod -R 7777 /

    this is good?
    You REALLY need to hire a qualified admin immediately. What you're suggesting above is the absolute most dangerous, worst thing you could possibly have said.
      0 Not allowed!

  7. #7
    Join Date
    Nov 2007
    Location
    Earth
    Posts
    289
    After the most dangerous "chmod -R 7777 /", I think the easiest and safest way is reinstall the OS.
      0 Not allowed!

  8. #8
    Join Date
    Sep 2002
    Location
    Among the corn
    Posts
    10,721
    Lesson learned?
    Hire an admin to take care of stuff like this for you!

    /etc/passwd must be world readable (chmod a+r /etc/passwd) for things.

    As with anything, the classsic "If you don't know what you're doing, don't touch it" rule applies. Pretty basic there.

    Of course, if this is your own box, then by god, it's not going to cost you anything but the reload cost. If it's NOT, then you need to have things reloaded onto another drive.
    Linux admin, support tech, php developer for hire. PM for more info
      0 Not allowed!

  9. #9
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    I think this could be fixed (without an OS reload), especially if you had a backup, but it would be a lot of work.
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!
      0 Not allowed!

  10. #10
    Join Date
    Dec 2000
    Location
    The Woodlands, Tx
    Posts
    5,962
    Quote Originally Posted by robocap View Post
    Thanks
    i run again chmod -R 7777 /

    this is good?
    Holy crap, your joking right? You didnt really do this did you?? If you have no other options available to you, immediately do

    chmod -R 755 /

    Then you need to go thru and try to determine correct permissions for things that need to be 444, 644, 777, etc. 755 for everything isnt perfect and certainly isnt best, but it's hella safer than 777 on everything, and should allow most everything to continue operating while you go thru and repair your permissions. Doing 755 will keep you a bit safer. You posted this on a public forum, and pretty soon scriptkiddies will learn of an easy server to hack and will be trying to hack your machine, and then you WILL need a complete format and OS reinstall if they succeed.
      0 Not allowed!

  11. #11
    Hire a admin, I can't believe you typed that...then you ask if its good?

    No offense, but I think shared hosting will be good for you, not VPS/dedicated.
      0 Not allowed!

  12. #12
    Join Date
    Apr 2000
    Location
    California
    Posts
    3,051
    It's not actually unreasonable to think someone might have a database or hard coded script that could restore the permissions on the system files and common file names, but I'm not aware of any such thing that exists, if it does. There are bound to be odd files or unexpected files, as no two servers are alike. How long did the original recursive command run for until you broke out of that command? Did you run the second one you asked about and if so, for how long? Did you let either finish? Or is the system still in the original state from the chmod 644 -R /? Again, did you notice the mistake and break out of it, or did it complete?
      0 Not allowed!

  13. #13
    This should be made a sticky (no offence to the original OP) as a lesson on running a server.

    Maybe with a big notice saying WHAT NOT TO DO

    I have seen so much of this on these forums. People blindly copying tutorials without taking any time to find out what the commands actually do.

    Then being shocked when things stop working. My advice to anyone else if you do not know what something does DO NOT do it. Especially when logged in as root!

    .
    Last edited by Hosting_Reserve; 02-18-2008 at 04:19 PM.
      0 Not allowed!

  14. #14
    Join Date
    Dec 2000
    Location
    The Woodlands, Tx
    Posts
    5,962
    Quote Originally Posted by Hosting_Reserve View Post
    Maybe with a big notice saying WHAT NOT TO DO
    I thought maybe it wasnt big enough

    I cant talk much. Back when I started years ago I thought I could simply mv partitions (didnt know anything)..... didnt work out so well. I probably set the record on crashes due to stupidity. But hey, I pretty much know everything there is to know about what NOT to do,
    I'm probably the leading expert on it

    Tim Greer comes in at a close second
      0 Not allowed!

  15. #15
    Join Date
    Apr 2000
    Location
    California
    Posts
    3,051
    Quote Originally Posted by Webdude View Post

    Tim Greer comes in at a close second :dgrin:
    Huh...? A close second to what now?
      0 Not allowed!

  16. #16
    Join Date
    Feb 2007
    Posts
    325
    Quote Originally Posted by a2b2 View Post
    You can try

    rpm --setperms -a

    Which might put things back together

    Rus


    Thanks

    solved this problem with this command ;-)
    Soon ...
      0 Not allowed!

  17. #17

    Thumbs up You saved me. Thank You

    Quote Originally Posted by rghf View Post
    rpm --setperms -a
    I am glad I found this thread. Great peace of command.

    Thanks..

    Saran
      0 Not allowed!

  18. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •