Lighttpd, php, shell_exec?

so i installed the etherwake and it works fine over command line with sudo

I made a simple web page with a button to run etherwake on click.

<?php
// Execute the etherwake command
$output = shell_exec('etherwake -i eth0 <MAC_ADRESS>');
echo "WOL command sent to device with output: $output";
?>

but this is not working yet, so I think it’s about sudo or sth. which user do i have to elevate and how? when i list /etc/passwd i don’t see a dedicated lighttpd or PHP username.

Default User should be www-data