It took me quite some time to figure out why the sudo stuff did not work for me.
I was reading the readme.txt in the digest_md5 folder, assuming that there would be some kind of automatic sudo.
This assumption is wrong and the right way is already mentioned in the online help:

On the Secure Site settings page, add sudo at the beginning of the line for the digest authentication script and the password storage script:
sudo /usr/local/digest_md5/digest_md5.php
sudo /usr/local/digest_md5/stored_passwords.php

This part is missing in the readme.txt, please update it.