What permissions should be used for uploading files?

FTP

Files should be uploaded with permissions 644, folders - with 755.

If you upload the files with the permissions 777, they will not be processed by the server due to the security reasons.