Optimize setting file permissions to save time.