permissions cleanup
restore rewrite base...there has got to be a better way to handle this