Stop recursion loop, and fix permission.