Hello,
Make sure that all sub folders of the /gallery/files/u/s/e/r/i/d are also CHMOD 777.
There are some FTP programs that only CHMOD parent folder levels and not also include CHMOD of the sub folders.
You can get a Trial copy of SmartFTP and it has recursive CHMOD.
I have done this w/ PHP and it seems to work for the most part. (i need to test it more.)
Code:
Content visible to verified customers only.