This website is not a technical support blog, but discovering a solution to this particular OS X problem almost made me weep with joy, so here's a blog post about it.
I acquired a MacBook Pro several months ago. It was configured with my user account already created. There was only one problem- my name was misspelled in the username. "No big deal", I thought to myself, "I'll simply change the username". BIG MISTAKE.
Never change your username on OS X Yosemite. Just blow your account away and create a new one before you get too comfortable with whatever settings, tweaks, applications, etc that you have installed. Never do it. I'm begging you.
There were several annoyances that came with this- my keychain disappeared, my keyboard and mouse settings weren't being applied, but what was the most annoying was that my iMessage attachments (picture messages, video messages, etc) were not coming through.
I was able to successfully recreate the keychain, and fix the keyboard and mouse settings by deleting and regenerating some strategic .plist files, but I couldn't figure out how to fix my iMessages to save my life. I'd receive a picture message and encounter an error on attempting to view them that stated "The application 'Messages' does not have permissions to view IMG_1234.png".
I tried to fix the problem myself to no avail and, after several months of passive anger, almost started to accept it the same way we accept when elderly relatives say horrible things at the dinner table.
JUST DELETE the ~/Library/Messages/Attachments file and recreate it as a folder.
You can use these two simple terminal commands-
rm ~/Library/Messages/Attachments mkdir ~/Library/Messages/Attachments
YEAAAAHHHH. Now I can finally continue to exchange screenshots of people on my Facebook timeline thinking that Onion articles are real and getting viscerally offended. God bless.