LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-03-2006, 05:20 AM   #1
ujjwal_wadhawan
LQ Newbie
 
Registered: Mar 2006
Posts: 6

Rep: Reputation: 0
apache - CBQ...superuser permission ...how to set..! HELP


Hi
i am doing a project on bandwidth management.I am using CBQ with some database. The project has a script that has to run in CGI....the script has to execute the command to restart the CBQ service...

Everything works fine except that i cannot execute the shell command from CGI or PHP exec() function,,,

code attached below for reference..

//file getinfo.sh
sh /etc/sysconfig/cbq/restartcbq.sh



//file restartcbq.sh
echo -e "SETTING UP CBQ CLASS <br>"
sleep 1

echo -e "service cbq.init restart nocache "
echo -e "<pre> $(service cbq.init restart nocache)</pre>"

echo -e "service cbq.init stats ##########Statistics ##########"
echo -e "<pre> $(service cbq.init stats) </pre>"

echo -e "<br> DONE................................Please Proceed<br>"


// OUTPUT in Webpage

DTU-ISP Suite--SHELL OUTPUT

SETTING UP CBQ CLASS

service cbq.init restart nocache


**CBQ: failed to add class 21 with parent on eth0!



service cbq.init stats ##########Statistics ##########

### eth0: queueing disciplines

qdisc sfq 21: quantum 1514b perturb 10sec
Sent 6293 bytes 20 pkts (dropped 0, overlimits 0)

qdisc cbq 1: rate 10Mbit (bounded,isolated) prio no
<snip>


the same command can be executed from shell with no error what so ever. I have tried adding the following line to /etc/sudoers in the end but its of no use.

<snip>
apache ALL = (ALL) NOPASSWD: /etc/rc.d/init.d/cbq.init,/sbin/tc,/sbin/ip
<snip>

i have also tried giving 777 in chmod to all files in /etc/sysconfig /var/www/html/ /var/www/cgi-bin/ and /etc/rc.d/init.d/

please tell me if i am wrong somewhere...or some superuser thing is missing... i have been googling around...but no success.!

please help..!!!!

thnx in anticipation
Ujjwal
 
Old 03-20-2006, 07:04 AM   #2
ujjwal_wadhawan
LQ Newbie
 
Registered: Mar 2006
Posts: 6

Original Poster
Rep: Reputation: 0
gt the solution

well...i was not using SUDO correctly....

apache ALL = (root) NOPASSWD: /etc/rc.d/init.d/cbq.init, /etc/sysconfig/cbq/restartcbq.sh



it worked...!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Super User For Apache..!! CBQ permissions...help..!!! ujjwal_wadhawan Red Hat 1 03-03-2006 06:53 AM
Had apache working, then set up vsftpd, now apache is refusing my connections beetle_boy66 Linux - Newbie 4 01-25-2006 08:57 PM
automatic set permission to device at boot mrosati Linux - Software 3 10-14-2004 03:05 AM
Cannot set write permission naveedbs Linux - Newbie 2 09-13-2003 10:54 AM
how to set quota, a/c and permission gogo Linux - General 1 10-09-2001 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration