Write config into each repository.
Only try to fix permissions if the config file exists.