ERROR: Unhandled exception: System.UnauthorizedAccessException: Access to the path .../.config/Unreal Engine is denied

I experienced the following error when attempting to create a C++ project with the Unreal Engine 4.22 on a Mac running 10.14.3:

An error occurred while trying to generate project files.

Running Mono...

Setting up Mono
/Users/Shared/Epic Games/UE_4.22/Engine /Users/Shared/Epic Games/UE_4.22/Engine/Binaries/Mac
ERROR: Unhandled exception: System.UnauthorizedAccessException: Access to the path "/Users/orlandorodriguez/.config/Unreal Engine" is denied.
         at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0005e] in <98fac219bd4e453693d76fda7bd96ab0>:0 
         at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in <98fac219bd4e453693d76fda7bd96ab0>:0 
         at System.IO.DirectoryInfo.Create () [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0 
         at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
         at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00036] in <98fac219bd4e453693d76fda7bd96ab0>:0 
         at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in <98fac219bd4e453693d76fda7bd96ab0>:0 
         at Tools.DotNETCommon.DirectoryReference.CreateDirectory (Tools.DotNETCommon.DirectoryReference Location) [0x00000] in <b22dd851f46744ca937fbe8e0fdf569d>:0 
         at UnrealBuildTool.XmlConfig.CreateDefaultConfigFile (Tools.DotNETCommon.FileReference Location) [0x00006] in <c7fb050b4f244217befc2e7e25beaa73>:0 
         at UnrealBuildTool.XmlConfig.FindInputFiles () [0x00102] in <c7fb050b4f244217befc2e7e25beaa73>:0 
         at UnrealBuildTool.XmlConfig.ReadConfigFiles (Tools.DotNETCommon.FileReference OverrideCacheFile) [0x000d4] in <c7fb050b4f244217befc2e7e25beaa73>:0 
         at UnrealBuildTool.UnrealBuildTool.Main (System.String[] ArgumentsArray) [0x001d5] in <c7fb050b4f244217befc2e7e25beaa73>:0
  • Open Terminal found in Finder > Applications > Utilities.
  • In Terminal, paste the following: defaults write com.apple.finder AppleShowAllFiles YES.
  • Press return.
  • Hold the ‘Option/alt’ key, then right click on the Finder icon in the dock and click Relaunch.
  • Set permissions for .config directory to Read and Write for the current user and/or admins.

I also experienced the same error when setting up and Source Control within the project. Now creating a C++ project and setting up a Source Control was done without issue.

I was wondering if there was a better way to resolve this and I hope this helps anyone that is having the same issue.

Do you know the command prompt input for windows? Thanks!