Optimize the directory rights