[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Chmod 700 etc

Posted on 2009-04-15
6
Medium Priority
?
1,213 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

649 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