ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-unix-users
perl-unix-users
[Perl-unix-users] Permistion Problem when run from the Web
by Nonlin other posts by this author
Nov 3 2009 12:42AM messages near this date
| Re: [Perl-unix-users] Permistion Problem when run from the Web
Dear Friends,

I know this is not directly a Unix problem but since this is happening in Fedora Lenix I tho
ugh your the best group to help me with this Issue. 

I need to execute some root level UNIX commands and access some root level files from an scr
ipt that is executed from the web. To be more specific, the script I am writing needs to res
tart sendmail. Example of "restartemail.pl":
------------
#!/usr/bin/perl --

use CGI ':standard';

@results = `service sendmail restart`;

print "@results\n";
------------

If I am login in as the root on the server and run this script, IT WORKS perfectly!

But if I call this script over the web into a browser. It FAILS! because 550 Permission deni
ed (real uid not trusted).


Now, I know that this limitation was set up for my protection, but I am writing a script tha
t don't let the user do what ever they want. The script is in full control of what is happin
g on the server and not the user, so their is really no real risk hear. I just need to get a
round this limitation to get the job dun.

Does anyone know how to make this work.

Sincerely,

Nonlin.
Thread:
Nonlin
Phillip Bruce
Nonlin
Nonlin
Bill Luebkert
Phillip Bruce
Nonlin
Nonlin
Jimmy Schappet
Ingo Schwarze
kenneth
Ingo Schwarze

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved