Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.python

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-10-2012, 10:48 PM
Dennis Lee Bieber
Guest
 
Posts: n/a
Default Re: Unable to execute the script

On Fri, 10 Aug 2012 12:35:06 -0700, Smaran Harihar
<smaran.harihar@gmail.com> declaimed the following in
gmane.comp.python.general:

> Hi Tim,
>
> this is the output for the ls -lsF filename
>
> 8 -rwxr-xr-x 1 root root 5227 Jul 30 13:54 iplantgeo_cgi.py*
>

<shudder>

A CGI script owned by root? What "user" does your web server run as
-- I'd recommend setting that user as the owner of the CGI script.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 08-11-2012, 06:59 AM
Hans Mulder
Guest
 
Posts: n/a
Default Re: Unable to execute the script

On 11/08/12 00:48:38, Dennis Lee Bieber wrote:
> On Fri, 10 Aug 2012 12:35:06 -0700, Smaran Harihar
> <smaran.harihar@gmail.com> declaimed the following in
> gmane.comp.python.general:
>
>> Hi Tim,
>>
>> this is the output for the ls -lsF filename
>>
>> 8 -rwxr-xr-x 1 root root 5227 Jul 30 13:54 iplantgeo_cgi.py*
>>

> <shudder>
>
> A CGI script owned by root?


Why not?

It's not setuid, so being owned by root does not give it
any special privileges.

> What "user" does your web server run as?
> I'd recommend setting that user as the owner of the CGI script.


That's definitely a bad idea. More so if it's writeable by its
owner, as is the case here. It would mean that if a security
hole allows intruders to write to arbitrary files, then they
can overwrite this script and that would allow them to execute
arbitrary code.

-- HansM

Reply With Quote
 
Reply

Thread Tools
Display Modes

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




All times are GMT. The time now is 04:14 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.