You need to determine what users Apache is running under. Sometimes this is root (often represented by 0) or sometimes this is another user like www. If the user that your granting permissions to is different than the Apache user then it does not matter what permission you give the web-server will still not have rights.

To give further explanation to Steve's, the permissions are given in a matrix with values: Read (4), Write (2) and Execute (1). These are obviously binary so their addition can designate the permissions granted to: Owner, Group and Guest.

As a rule of thumb, you NEVER want to grant anyone but yourself Write permission so either a 4 (in general) or 5 (only allow PHP scripts to be executable ... and they generally don't even require that designation. Thus, 644 or 755 are common - unless you want to bar visitors from viewing in which case 600 would be what you would use. Just remember NEVER to give yourself a non-write code or you'll have difficulty resetting that without cPanel's File Manager (or the like).

When you set a directory with the 644 (or 755), that will be assigned to any file added so that's likely the problem you're running into.

First, did you change the permissions on the adds folder to 766 as suggested? It MUST have write permission for the (Apache) user.

Okay, saying that, I'm more concerned about what you didn't say: That you confirm that the file was uploaded (to the server's upload directory) then READ by imagecreatefromjpeg, resized and then written to your adds folder. This will ensure that the uploaded image was uploaded and was a JPG file with the additional benefit of ensuring that it is an appropriate size.

If you're not checking the upload files in this manner, you're inviting hackers to deposit "payloads" on your server to spread across the Internet.

That seems to be an unusual setup on your server. If this is hosted, ask your support team for help as new files should receive the same permission as the folder. Perhaps using PHP to change the file permission after storing in the folder?

Unnecessary? Ha! Any script kiddie can hide a "payload" in an image file and the file type will report the appropriate image definition. THAT is why I recreate any image uploaded to my server. I may be paranoid but there are script kiddies out there looking for kicks and I don't want to be a willing target.

First, the filename is .htaccess (not two t's - presumably a typo) then Options -Indexes merely forbids Apache from providing a directory listing so it has nothing to do with this problem.