If on a Windows computer, several things within the Windows OS can cause this:
  1. Windows Security - Protected Folder setting
  2. Windows user account permissions
  3. File/Folder Read Only status
  4. Cloud backup settings
  5. Anti-virus/anti-trojan software settings
  6. Actual location of User Folders in relation to the default User Folders location
Basically, the game client needs to write to certain User Files during the operation of the game client, in order to save various in game settings and variables. If anything prevents the write action, the game then reports the "error" you see.

As your error "corrected" itself after awhile, I'm inclined to think your issue was with Cloud backup settings, as in at the times the game needed to write to the file(s), the Windows OS happened to have been syncing with a cloud backup, like Microsoft One Drive or such, which during that sync the file(s) in question are "locked", so no data can be written to them.
To prevent that sort of thing from happening, change the settings on the cloud client to only do backups or sync during "off hours" when you are not gaming, or better yet, completely shut down and exit the cloud client when you are gaming.

Another possible reason for the error could have been that during the time you were gaming, the Anti-virus/anti-trojan software decided it would be a great time to do a scan. During a scan, when the Anti-virus/anti-trojan software happens to be inspecting the folder(s) and/or file(s) where the game client stores the user settings, those folder(s)/file(s) are locked by the scan, which can trigger the error you got if the game client needed to write to them.
To prevent this, configure that Anti-virus/anti-trojan software to only do system scans during off hours and/or shut down/exit the Anti-virus/anti-trojan software while gaming.