I have a php script, say file.php that contains:
<?php
exec("ip netns exec vpn file2.php");
?>
If I run file.php via the command line, as root, it works. However, when I run it via apache, www-data doesn't have the permissions to use ip netns exec, however, www-data can use ip netns list.
How do I either a) let ip netns exec be run by non root users, or give www-data the permissions to run ip net exec stuff?