LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 02-26-2007, 07:51 AM   #1
atiq
LQ Newbie
 
Registered: Feb 2007
Posts: 3

Rep: Reputation: 0
Executing system commands in a php script


Hi,
I have a php script in which i am executing some shell commands (e.g date, who, ping, shutdown etc) using the System command. When I run the script from command line, every thing goes fine because I have the root privileges.
But if I run the script from web browser, only those commands are executed which don't need root privilages.
How to fix it?
It might be insecure but at the moment, I am not concerned about security.

Regards,
Atiq
 
Old 02-26-2007, 08:14 AM   #2
avallach
Member
 
Registered: Sep 2006
Location: Silesia
Distribution: Debian GNU/Linux 4.0, ArchLinux, OpenBSD
Posts: 190
Blog Entries: 2

Rep: Reputation: 30
Maybe it will work when running those commands by sudo ?
 
Old 02-26-2007, 09:45 AM   #3
atiq
LQ Newbie
 
Registered: Feb 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by avallach
Maybe it will work when running those commands by sudo ?
No it doesn't work.
 
  


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
Cron not Executing PHP script Badnoodles Linux - General 2 10-25-2006 04:56 PM
Executing shell commands through PHP!!! Richtown Linux - Newbie 6 04-12-2006 02:57 PM
Executing UNIX command from PHP script ckoniecny Programming 3 03-01-2006 10:42 PM
Executing PHP script- error message vfulco Linux - Newbie 3 07-13-2004 10:55 PM


All times are GMT -5. The time now is 12:37 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration