LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-05-2004, 10:19 PM   #1
kelnt
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Rep: Reputation: 0
Unhappy chmod 0444 /etc/*


during the install and debugging of a php app on my home server I accidentally ran this command:
chmod 0444 /etc/*

I didn't notice any problems right away but soon I was unable to run any command with messages that I didn't have permission.

I rebooted.


Computer will not boot says that it can not run /bin/bash (don't remember reason given) and then that it can not run several other programs called for by init.

I booted from a rescue cd and restored permissions as best I could according to the /etc/ listing of a similiar computer. I still get same error.

I would've'e have thought changing back permissions would take care of it.


Any thoughts on how to correct situation shy of a reload.


I spent many late evenings getting LAMP and PEAR several other apps compiled and configured. I'd like to avoid that if possible.

I obviously need to setup some sort of backup solution.


System

Vector Linux 3.2 (Based on Slack 9.0)
amd k6-2 500


If more info is required I will be more than happy to oblige.


Thanks,
Keln
 
Old 11-06-2004, 12:05 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Eeek. I remember an accidental permissions loss on /usr. What a nightmare. I ended up reinstalling. In any case, more specific error messages will help us to debug your problem.
 
Old 11-06-2004, 05:57 AM   #3
dmigh
LQ Newbie
 
Registered: Oct 2004
Posts: 29

Rep: Reputation: 15
Hi,
Try this, and let me know how it goes.

chmod -R 755 /etc/*

--
 
Old 11-06-2004, 07:51 AM   #4
kelnt
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Original Poster
Rep: Reputation: 0
At one time I already changed permission to 777 thinking that would at least get me booted. It didn't. I don't understand why not. Unless I cleared a suid bit somewhere? I will to get some pertinent boot log information and post back.

Thanks,
Keln
 
Old 11-06-2004, 10:27 AM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
/etc/passwd, /etc/group, and /etc/shadow may need specific permissions to make the system boot.
 
Old 11-06-2004, 11:17 AM   #6
kelnt
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Original Poster
Rep: Reputation: 0
here is what I set them to:

-rw-r--r-- 1 root root 768 2004-10-26 14:14 /etc/group
-rw-r--r-- 1 root root 750 2004-11-05 15:40 etc/passwd
-rw-r----- 1 root shadow 1169 2004-10-26 14:14 /etc/shadow

Do they look right?
 
Old 11-06-2004, 12:43 PM   #7
kelnt
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Here is the first sign of trouble that I can see on boot.

INIT: version 2.84 booting
INIT: cannot execute "/bin/sh"
INIT: ENTERING runlevel: 5
INIT: cannot execute "/etc/rc.d/rc.syscinit"
"/sbin/update"
"/etc/rc.d/rc.X"
"/etc/rc.d/rc.X"
"/etc/rc.d/rc.X"
"/etc/rc.d/rc.X"
"/etc/rc.d/rc.X"
"/etc/rc.d/rc.X"
"/etc/rc.d/rc.X"
"/sbin/mingetty"
"/sbin/mingetty"
"/sbin/mingetty"
"/sbin/mingetty"
"/sbin/mingetty"
"/sbin/mingetty"
"/sbin/mingetty"
"/sbin/mingetty"
"/sbin/mingetty"
"/sbin/mingetty"

then the system gives errors about mingetty respawing to fast.
 
Old 11-13-2004, 09:34 PM   #8
kelnt
LQ Newbie
 
Registered: Nov 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Smile solution

I dug deeper into the problem tonite. I attempted to use a recue disk and chroot into my root partition. I recieved this error:
<error qoute>
"Cannot execute /bin/bash: Permission denied"
<\error qoute>

After googled the error and this web site provided some good answers: http://www.linuxgazette.com/issue52/okopnik.html

After further troubleshooting I discovered that somehow permissions had been changed to 0444 in /lib also.
Not sure how, but anyways all is back to normal and I have a bootable system. Hope this helps someone else.

Thanks,
Keln
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use Chmod Centinul Linux - Newbie 8 06-30-2005 10:44 AM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 05:37 AM
Chmod gibbylinks Linux - Newbie 1 10-23-2003 11:17 AM
chmod u+s csDraco_ Slackware 6 04-22-2003 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration