First of all which distro are you using?
I think you are logged in as a normal user.
So you don't have the privileges to change the permissions of grub.cfg.
You should login as root. And then change the permissions.
If you are using ubuntu, then you should be a sudoer.
#sudo chmod u+w grub.cfg