chmod 660 somefilename
chmod 770 somefilename
0660 = user rw, group rw, other no access
0770 = user rwx, group rwx, other no access
Basically the legend for it is:
So to get read, write for a user and group you would do the following.
user= 2+4 = 6
group= 2+4 = 6
other= 0 = 0
There is a fourth set as well before user (0000), but you probably shouldnt worry about those for now.
Nevermind, yours is a different problem, maybe the above will help you at some point though.