The executable permission of file after downloading is getting changed. Is there any protocol or way to intact the permission?

Keywords: python django linux download chmod

Question: 

I have deployed a Django application on AWS EC2 and application is targeted for Linux desktop users. There are some files which get downloaded in browser when clicking some links and are meant to be run by clicking on the files.

I am setting the permission of the file to executable before deploying but the file permission gets changed after downloading. I am using the HTTPS protocol. Is there any protocol or way to keep the permission of files after downloading so users don't need to do chmod in terminal?

The executable files are generated by using tool pyinstaller.

Answers: