This happens to me all the time, usually when I copy a text file generated on Windows over to my Linux server via a network share managed by
samba on the server's side. Hastur is right, in the comments, and Joe Sewell in his answer, too: it's just the 'executable' permissions flag is set. My solution is:
chmod u-x,go+r filename
This makes it not-executable for my user, and readable for 'group' and for 'others'. The
,go+r part is optional, as long as you are the only one who's going to need to access the file.
EDIT: It should be possible to change the default
samba behavior for these permissions. I haven't bothered to try figuring it out, but a quick Google search turned up this serverfault post that describes the first thing I would try:
I typically use SAMBA's native functionality for permissions and groups management on shares. For example..
You would specify these settings under the share. Be certain to reload SAMBA after the configuration change, which could be done via the init script.
Based on the comments on that question/answer, there are a number of subtle and specific settings that must be properly set. I'm able to be of no help in that regard, I'm afraid.