Fix permission problem when sharing data dir.