sudo su (permanent root terminal) and then launch the script without sudo (because you're already root). BTW, i'm not sure you can launch your script just by typing it's name, it should be bash /opt/script or python /opt/script or w/e is needed to run the script.
– MrVaykadjiSep 17 '14 at 18:18

Does the file have executable permissions on it? That might be why you see permission denied when you try to run it as sudo.
– ChisholmSep 17 '14 at 18:19

@MrVaykadji the OP is using sudo -i which is equivalent to sudo su. In fact, there's no point in sudo su, just use sudo -i or simple su depending on your setup. As for needing a name, that depends on whether the script has a correct shebang line.
– terdon♦Sep 17 '14 at 18:34

1

Please edit your question and show us the output of ls -l /opt/poky/1.6/xx and also tell us what xx is. What kind of script. Ideally, we'd like to see the script itself but at the very least, we need to know what it is.
– terdon♦Sep 17 '14 at 18:36

1 Answer
1

The error "Permission Denied" often means that you do not have execute permission on the file. To fix that, run chmod +x <filename> as the root user. Now, the root user can run the file using ./<filename>.

Command Not Found can mean many different things. First off, you need to have the ./ or an absolute path for running files not in your $PATH variable. (i.e../test.sh or /home/user/bin/test.sh).

However, Command Not Found can also mean that a library is missing. Check that you have all the required dependancies to run that file.