Solved

Chmod 700 etc

Posted on 2009-04-15
6
1,103 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
  • 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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 125 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

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