On Mon, 6 Oct 2003, Mark Edwards wrote: > I'm having a problem starting spamd via sudo. This is using the current > FreeBSD port, and the behavior started with SA 2.6. I can start it > successfully if I su to root, but if I try to use sudo, I get: > > sudo /usr/local/etc/rc.d/spamd.sh start > Insecure directory in $ENV{PATH} while running with -T switch at > /usr/local/lib/perl5/5.6.1/Cwd.pm line 92. > > Any idea what that's about?
Looks like sudo is propagating your environment to spamd.sh. When you su to root, the software involved sanitizes things some to reduce the opportunities for accidents. Probably the simplest fix is to make a spamdwrapper: #!/usr/bin/bash export PATH= /usr/local/etc/rc.d/spamd.sh and sudo spamdwrapper instead. You may have to do something to help it find perl (either the PATH variable or editing the full path into the script that invokes perl). dan ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk