You never want to give Apache root access! What we do is have a process running in the background that checks a special folder for scripts and runs in a loop. When it finds a script in the folder it executes it ( as long as a file with a .log ext for the same name does not exist ) and creates a log file for the results in the same folder, named after the file name of the script that it ran. We then read in the results of the log into PHP, delete the script , then the log and do what we want with the data we read in..
-----Original Message----- From: Lawrence Nahum [mailto:[EMAIL PROTECTED] Sent: Monday, May 15, 2006 11:41 AM To: debian-user@lists.debian.org Subject: Controling the routing via PHP Hi all! I know a little of linux, bash scripting and networking. I have a debian stable machine, with apache + php+mysql that provide a webinterface written by me. That machine would have no default routing and many gateway. On the lan side, people can only connect to the server via the webinterface and allow a certain computer to connect creating on the fly the routing on the selected gateway. I think that doing this by MAC address would do. For now, I've made a simple bash script that I execute from PHP and it would return me the mac address given the ip, otherwise after a reasonable timeout return NONE which would tell me that the user is not online. I'm looking at iproute2 and of course netfilter, I'm not really sure if I should use bash scripting or not, and in case, when I execute a script from php the priviligies are as Apache, which is limited, and I might need root priviligies, what should I do ? Change apache priviligies, sudo the script, i'm really not sure. thanks all for attention and i hope i'm on topic. Lawrence -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]