use posix_setuid to change user for script runs.