Insufficient permissions to access USB/Flash drive after UID change

I managed to solve this problem by unmounting all USB disks I had plugged in and deleting the /media/username directory.

Then, when I plug in my USB stick again, the directory gets re-created and all is good.