Praveen,
These commands require root permissions. I think you cannot execute these cmds via webserver as its not root account instead its www.
Regards,
Nitin
1. If you want to compile the httpd source in your own project. You can download the soure in the below link. and compile i t in external/apache-http
apache-android-httpd - This is Apache HTTPD for Android - Google Project Hosting
2. If you want to directly use busybox httpd,
#httpd -p 80 -h /documentroot -c /etc/httpd.conf
One httpd.conf example is attached.
Hope above info can help you.
Hi waterzhou
Thanks for your valuable information, now i am able to start http server, but When the server is trying to create a process its being killed unexpectedly i tried with giving the permissions 777 and 755 but it doesn't worked.
Hi,
Now i am able to run the httpd server with the binaries given by you but now iam facing an issue related to permissions.
The error in the log is "Operation not permitted" for the file, but i tried by giving permissions 777,755 but it doesnt worked should i change anything in the httpd.conf so that the cgi files can execute a particular file. In httpd.conf i have given User as system and Group as root, So please help me in solving the issue.
I am able to run the httpd server and able to access my web page contents but when i try to execute an ifconfig eth0 x.x.x.x its giving error "cannot open control socket permission denied", and iam able to run the command on console manually.
HI, Kumar,
About this , I think maybe caused by race operation for eth0. As you know, eth0 is using by http-server while you try to change it's ip address. Have you tried to ifconfig eth0 x.x.x.x. before you run httpd_server?
Hi Zhou,
Thanks for the quick response, the problem is not only with the ifconfig but also with any command such as rmmod, insmod, busybox, etc i.e, i am not able to execute any command through web server as its giving the error as i mentioned above. I think the issue can be solved by sudo but in android i dont have sudo, so please tell me whether we have sudo for android or not?