* is a wildcard for everything in the directory including files and directories.
so the chmod will remove the execute permission from directories also.
> ls -a tmp
file1
file2
.file3
> ls tmp/*
file1
file2
> ls tmp/.*
.file3