?
Solved

Chmod 700 etc

Posted on 2009-04-15
6
Medium Priority
?
1,163 Views
Last Modified: 2012-05-06
I accidently do chmod 700 to etc folder in my Redhat EL5...Will i face problem later?
0
Comment
Question by:emlily
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 29

Expert Comment

by:fosiul01
ID: 24146282
yap,

700 meant : Read + write+execute to OWNER

 and other will have NO access to that directory

and /etc hold all the configuration file such as apache, samba and others

so those serivce would not run  
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24146322
if you have a backup of /etc/ directory then you can try to restore /etc/ directory from backup, it might fixed the problem
0
 

Author Comment

by:emlily
ID: 24146333
i have the backup...but when i copy /backup/etc to /etc...even i used force command...i still ask y or n
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 29

Expert Comment

by:fosiul01
ID: 24146390
what commadn you using

cp  -Rf  should work forcefully.




0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 375 total points
ID: 24146613

Hi,
if you have a backup directory, there is a simpler way to restore permissions. Run the following commands against your backup directory and run the resulting script against your original  directory (verify the correctness of the script's contents before running it!) -

cd /backup
echo "#!/bin/ksh" > /tmp/chmodscript.sh
find ./etc | xargs -i{} stat -c "%a %n" {} | awk '{print "chmod", $1, $2}' >> /tmp/chmodscript.sh
echo "exit" >> /tmp/chmodscript.sh
chmod +x /tmp/chmodscript.sh  
cd /
/tmp/chmodscript.sh  

Note that the cd - statements (in bold above) are very important for this to work!

Good luck!
wmp
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24147127
yap good script....
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question