A confident guess: Change "#!/bin/csh -f" to "/bin/csh -fb". I bet the filter is being invoked from a setuid program which does not reset its real and effective uids to the same value. Thus, as far as csh knows, it is being invoked for a setuid script. Matt Crawford