I have compiled a program on my Ubuntu 16.04. When
ls -l <filename>
is run, it produces the following output on my computer which suggests that anybody can execute this file(i guess?) -
-rwxr-xr-x 1 ritwik ritwik 10132280 May 4 12:44 <filename>
Then I uploaded this file to github. Now, when someone downloads this file from my github repo and executes it on their computer, it throws the 'Permission Denied' error. However, when they run -
chmod u+x <filename>
and then execute the file, no such error occurs.
How can I change permissions before uploading so that the users do not have to change the permissions themselves (do not have to do that chmod thing) ?