I need 2 scripts:
1) a shell script that can recursively get all the permissions / owners of a directory and store them in a file. I imagine it would basically be a list of paths with their attributes.
2) a shell script that can take the file of permssions / owners and recursively apply all those chown / chmod commands.
Both scripts will be run as root.
You can use any language... bash, sh, perl, php.. etc... preferably not python as I do not know python at all.