Mike,
I think you need to use setuid in a script: see here for details on setuid;
http://stackoverflow.com/questions/5...ot-run-as-root
I use Luks rather than encyptfs but it may give you a hint. I have a compiled C program (say openup) where openup.c looks like this:
int main()
{
setuid( 0 );
system( "/bin/bash -c /home/.../opencrypt.sh" );
return 0;
}
where opencrypt.sh is the bash script to open the encrypted folder
Here openup is owned by root with setuid set (was compiled as root, I think); group and others have the exec set.
There may be safer or less clumsy ways of doing it, but that works on OpenSuse.