Skip to main content

Run function as another user

export -f <function_name>
su <user to run function as> -c "bash -c <function_name>"