Some muppet has changed the permission & ownership on one of our servers from / down. Has anyone got a script to copy permissions and ownership from one box to another.
e.g
old box
ls -al|awk '{print $1,$3,$4,$9}' > list
new box
while read list
do
chmod $1..... $4
chown $2..... $4
chgrp $3..... $4
done
--
| Mike Nixon
| Unix Admin
|
----------------------------
e.g
old box
ls -al|awk '{print $1,$3,$4,$9}' > list
new box
while read list
do
chmod $1..... $4
chown $2..... $4
chgrp $3..... $4
done
--
| Mike Nixon
| Unix Admin
|
----------------------------