fix up directory ownership and permissions