Many people have trouble when doing a shell script through applescript even when the shell script works perfectly in the Terminal. A common problem is that the command that you're using with "Do shell script" works in the Terminal (tcsh for most) but doesn't work with zsh that applescript uses when you invoke "Do shell script". To get the command to work , you have to specify the pathway to the command for the applescript to be able to use it.
To get the pathway to a command, simply type "which " and the command while in the Terminal. Then press "return." For example:
% which chownGives you /usr/sbin/chown as output.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020617093701406