Results 1 to 17 of 17
-
02-14-2008, 04:13 PM #1Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 327
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
ThanksSoon ...0
-
02-14-2008, 05:53 PM #2Web Hosting Master
- Join Date
- Feb 2003
- Location
- Canada
- Posts
- 1,010
Changing all your permissions back could take forever.
You'd be better off with a reinstall. It would take less time.0
-
02-14-2008, 05:56 PM #3Web Hosting Master
- Join Date
- Jun 2003
- Location
- UK
- Posts
- 6,616
You can try
rpm --setperms -a
Which might put things back together
RusRuss Foster - Industry Curmudgeon
Freelance Sysadmin for Hire - email vaserv@gmail.com0
-
02-14-2008, 06:08 PM #4Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 327
Thanks
i run again chmod -R 7777 /
this is good?Soon ...0
-
02-14-2008, 06:09 PM #5Web Hosting Master
- Join Date
- Jun 2003
- Location
- UK
- Posts
- 6,616
Nope thats probably made things a lot worse. Now you definitely need a reload
Russ Foster - Industry Curmudgeon
Freelance Sysadmin for Hire - email vaserv@gmail.com0
-
02-15-2008, 12:06 AM #6Web Hosting Master
- Join Date
- Apr 2000
- Location
- California
- Posts
- 3,051
0
-
02-15-2008, 02:54 AM #7Web Hosting Guru
- 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
-
02-15-2008, 05:52 AM #8
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.Tom Whiting, WHMCS Guru extraordinaire
Linux problems? WHMCS Problems? Give me a shout
Check out my WHMCS Addons0
-
02-15-2008, 11:55 AM #9Web Hosting Master
- Join Date
- Nov 2001
- Location
- Ann Arbor, MI
- Posts
- 2,979
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
-
02-15-2008, 12:41 PM #10Web Hosting Master
- Join Date
- Dec 2000
- Location
- The Woodlands, Tx
- Posts
- 5,974
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
-
02-15-2008, 01:26 PM #11Disabled
- Join Date
- Dec 2007
- Posts
- 279
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
-
02-15-2008, 01:38 PM #12Web Hosting Master
- 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
-
02-18-2008, 04:16 PM #13Disabled
- Join Date
- Jan 2005
- Location
- UK
- Posts
- 132
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
-
02-18-2008, 06:38 PM #14Web Hosting Master
- Join Date
- Dec 2000
- Location
- The Woodlands, Tx
- Posts
- 5,974
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 second0
-
02-18-2008, 06:49 PM #15Web Hosting Master
- Join Date
- Apr 2000
- Location
- California
- Posts
- 3,051
0
-
02-19-2008, 03:11 AM #16Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 327
0
-
10-22-2012, 01:46 AM #17New Member
- Join Date
- Oct 2012
- Posts
- 1
0