in reply to Execute But Not Read

I think yes. Check out the binfmt_misc stuff.

I have a quick implementation of a hash/bang/bang (hbb) script invocation system using this mechanism. The idea of this was that:

#!! perl ...
would look in system defined locations rather than an user's path. If root was the user a differing set of locations could be used.

If you fiddle with permissions and this mechanism I'm sure you could do what you want. This would be in C.

The binfmt_misc stuff is very clean and simple to handle. You may have hbb to give you a kickstart.

Be well,
rir