Hey all, I'm trying to access a vmail directory from a php script using the exec command. I've tried various different methods but none of them work. I am assuming it is because of permissions. The line of code simply counts the number of files in the directory. The php code is: Code: exec("/usr/bin/sudo -S ls /var/vmail/xxxx.ca/yarnell/Maildir/cur | wc -l", $output, $return_var); echo $return_var; I get the following error Code: Mar 5 05:08:08 www sudo: web3 : command not allowed ; TTY=unknown ; PWD=/var/www/clients/client1/web3/web ; USER=root ; COMMAND=/usr/bin/ls /var/vmail/xxxxx.ca/yarnell/Maildir/cur Any thoughts?