Maybe the permision denied comes from what you executed inside the script? Can the commands you've put in the script be executed as user? Use "ls -al" to view what priviledges you have set to a file. Make a reboot and see if it is rmoved from the menu.