Chmod 700 etc

I accidently do chmod 700 to etc folder in my Redhat EL5...Will i face problem later?
emlilyAsked:
Who is Participating?
 
woolmilkporcConnect With a Mentor Commented:

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
 
fosiul01Commented:
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
 
fosiul01Commented:
if you have a backup of /etc/ directory then you can try to restore /etc/ directory from backup, it might fixed the problem
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
emlilyAuthor Commented:
i have the backup...but when i copy /backup/etc to /etc...even i used force command...i still ask y or n
0
 
fosiul01Commented:
what commadn you using

cp  -Rf  should work forcefully.




0
 
fosiul01Commented:
yap good script....
0
All Courses

From novice to tech pro — start learning today.