I wanted to add this bit of info in case anyone else with the same error message might be helped by it. Like many others, I scoured dozens of threads with multiple suggestions until something finally worked. Since this is one of the more recent threads, I'll drop it in here.
This was the pre-populated file-path for media uploads found in my WP Settings > Media > upload path, probably from a previous WP version (or former hosting provider, more likely) because I had never specified this path: (example):
After getting sporadic permissions errors trying to upload to the uploads directory, I removed the above path and replaced it with the default wp-content/uploads path. This immediately fixed the problem, and the former settings field disappeared from the media settings page, further suggesting that it was legacy settings field.
Anyway, I hope this helps somebody else with this problem. All the advice I'd seen about setting permissions to 777 was bad advice for an uploads directory, IMO.