fix permissions and ownership on authentication directories.