You should be able to exec anything although you won't have any environment variables, including a PATH, so you will need to use full paths
-rwxr-xr-x 1 robh staff    6947 Oct 25  2002 yourn.cgi
/nfs/nfs6/home/robh/cgi-pub
id
SERVER_NAME=cgi.luddy.indiana.edu
uid=18396(robh) gid=1010(staff) groups=1010(staff),500(sharks),501(burrow),1076(sysadmin),1432(facil),3043(burrow-docker),59986(vboxusers)
This is an echo test
uid=18396(robh) gid=1010(staff) groups=1010(staff),500(sharks),501(burrow),1076(sysadmin),1432(facil),3043(burrow-docker),59986(vboxusers)