Problem solved - so far. Chris M had a look at the server and found that the mapserv binary was owned by root and that apache was running suexec and restricting access to the CGI to the user running the website. So the ownership of the mapserv binary had to be changed to the user running the website and then users from the WWW could run mapserv.
Bob