We're removing write and execute permission for members of the group. You can also specify permissions for users, groups or others in the same command, separated but commas. Give everyone execute access. Specifying 'a' here is not essential. This sets the file permissions to exactly what is specified.
Permissions now are -rwxrwxrwx.
There is another way in which you can specify the file permissions. The permission bits r,w and x are assigned a number. Now you can use numbers, which are the sum of the various permission bits. The chmod command now becomes chmod xyz filename where x,y and z are numbers representing the permissions of user, group and others respectively. Each number is the sum of the permissions to be set and are calculated as given above.