I was having a lot of trouble uploading images and repeatedly getting the error:
Warning: filesize(): stat failed for public://image.jpg in file_save() (line 575 of /home/patcms/public_html/includes/file.inc)
When I logged into my server (Ubuntu 10) I went to the directories that I had setup on the admin/config/media/file-system screen. Here in the "~/public_html/sites/default/files" directory, I could see sub-directories, but I didn't see any of the files I had tried (& failed) to upload.
However I did notice that files were being uploaded to "~/public_html/public:" (with the colon and everything).
Based on this I created a "~/public_html/private" directory, and configured that on the admin/config/media/file-system screen. After switching my content type to put images in private storage everything worked fine.