Looking at the code I found
//file: Cron.class.php
public function __construct($var1 = 'asterisk', $var2 = 'asterisk') {
// Lets figure out if we were given a FreePBX Object, or a user.
if (is_object($var1)) {
$this->freepbx = $var1;
$user = $var2;
} else {
$user = $var1;
}
$this->user = $user;
// If we're not root, we can only edit our own cron.
if (posix_geteuid() != 0) {
$userArray = posix_getpwuid(posix_geteuid());
if ($userArray['name'] != $user)
throw new Exception("Trying to edit user $user, when I'm running as ".$userArray['name']);
} else {
$this->uoption = "-u ".$this->user." ";
}
}
setting $var1 to www-data should do the trick but this will break on future updates…