LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 01-09-2006, 04:19 AM   #1
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Rep: Reputation: 30
able to run root-only commands via php scripts?


I know php scripts can run some system command, but how abt commands like restarting services? Is there a way to do it?

Because the plan is to create a web gui for simple system admin (editing http, virtual host, dns etc) and allow the changes to take effect.

The only way to my limited knowledge is to reset the service, thus the question..


Unless there's a way to let the changes take effect without intervention?
 
Old 01-09-2006, 04:30 AM   #2
T.Hsu
Member
 
Registered: Jan 2005
Posts: 178

Rep: Reputation: 30
Configure sudoer, allow user running apache to do those root tasks.

Last edited by T.Hsu; 01-09-2006 at 04:33 AM.
 
Old 01-09-2006, 06:01 AM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Quote:
Originally Posted by T.Hsu
Configure sudoer, allow user running apache to do those root tasks.
Which is a really bad idea in my opinion. Your basically opening up the doors to anyone who might have access root access, especially if you end up having some type of exploit in your php code.

Why not install something like webmin or the like if you need some GUI interface to do such things for you?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't run shell scripts even as root nitrousoxide82 Linux - Newbie 2 04-24-2005 04:47 PM
how can i run a shell scripts (or a number of commands )when a user logs in to a linu rddreamz Programming 4 05-20-2004 03:08 PM
how to make/run startup scripts/commands ViN86 Slackware 3 04-24-2004 10:02 AM
PHP to run Shell commands Gear_freak2000 Linux - Software 4 06-04-2003 05:39 AM
Scripts won't run commands Xyphoid Linux - General 4 08-08-2002 08:49 PM


All times are GMT -5. The time now is 09:38 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration