Re: chown'ing by script

Discussion in 'Python' started by Carsten Haese, Jan 6, 2010.

  1. Victor Subervi wrote:
    > Hi;
    > I have a script that is called via the web. This script writes another
    > script that is also called by the web, which in turn needs to have
    > execution privileges. The problem is that the programmatically created
    > file is owned by apache.apache and thus doesn't have execution
    > privileges. I've tried os.chown(...) but this throws an OSError. I
    > understand that chown'ing programmatically opens a big security hole.
    > However, setting the gid to give apache execution privileges isn't any
    > better. What do you suggest?


    I suggest you find a way to achieve whatever it is you are trying to
    achieve without having to execute programmatically created scripts. What
    is the underlying problem you're trying to solve with this approach?

    -Carsten
     
    Carsten Haese, Jan 6, 2010
    #1
    1. Advertising

  2. Carsten Haese

    alex23 Guest

    Carsten Haese <> wrote:
    > What is the underlying problem you're trying to solve with this
    > approach?


    To be paid for developing a web site shopping cart without actually
    having to learn Python.
     
    alex23, Jan 6, 2010
    #2
    1. Advertising

  3. Carsten Haese

    Steve Holden Guest

    Victor Subervi wrote:
    > On Wed, Jan 6, 2010 at 2:12 AM, alex23 <
    > <mailto:>> wrote:
    >
    > Carsten Haese <
    > <mailto:>> wrote:
    > > What is the underlying problem you're trying to solve with this
    > > approach?

    >
    > To be paid for developing a web site shopping cart without actually
    > having to learn Python.
    >
    >
    > LOL! I've written about 12,000 lines of code in this, BTW. Crawl back
    > into your cave :)
    > beno
    >

    Which, I don't doubt, could have been 2,000 lines had you bothered to
    take the excellent advice you've been offered on learning Python. Still,
    "the better the advice the worse it's wasted" ...

    regards
    Steve
    --
    Steve Holden +1 571 484 6266 +1 800 494 3119
    PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
    Holden Web LLC http://www.holdenweb.com/
    UPCOMING EVENTS: http://holdenweb.eventbrite.com/
     
    Steve Holden, Jan 6, 2010
    #3
  4. On Wed, 06 Jan 2010 08:58:13 -0500
    Steve Holden <> wrote:
    > Victor Subervi wrote:

    [Usual nonsense removed]

    > Which, I don't doubt, could have been 2,000 lines had you bothered to


    Steve - any chance that you could stop replying to this idiot or at
    least do it privately. There's not much point to kill-filing someone
    if someone else is just going to repeat his posts.

    --
    D'Arcy J.M. Cain <> | Democracy is three wolves
    http://www.druid.net/darcy/ | and a sheep voting on
    +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
     
    D'Arcy J.M. Cain, Jan 6, 2010
    #4
  5. Carsten Haese

    Steve Holden Guest

    D'Arcy J.M. Cain wrote:
    > On Wed, 06 Jan 2010 08:58:13 -0500
    > Steve Holden <> wrote:
    >> Victor Subervi wrote:

    > [Usual nonsense removed]
    >
    >> Which, I don't doubt, could have been 2,000 lines had you bothered to

    >
    > Steve - any chance that you could stop replying to this idiot or at
    > least do it privately. There's not much point to kill-filing someone
    > if someone else is just going to repeat his posts.
    >

    I think idiot's a *bit* strong, but I have to confess that even my
    tireless wish to evangelize Python has in Victor's case become a bit
    tired, so I will be happy to oblige.

    Victor, please refer to python-tutor for further (and more appropriate)
    assistance.

    regards
    Steve
    --
    Steve Holden +1 571 484 6266 +1 800 494 3119
    PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
    Holden Web LLC http://www.holdenweb.com/
    UPCOMING EVENTS: http://holdenweb.eventbrite.com/
     
    Steve Holden, Jan 6, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GfxGuy

    JNI/Linux/chown

    GfxGuy, May 28, 2005, in forum: Java
    Replies:
    6
    Views:
    2,524
    Ross Bamford
    May 29, 2005
  2. James Colannino

    os.chown()

    James Colannino, Nov 11, 2005, in forum: Python
    Replies:
    3
    Views:
    9,385
    Tim Roberts
    Nov 13, 2005
  3. Brian Candler
    Replies:
    2
    Views:
    336
    Emiel van de Laar
    Mar 2, 2005
  4. superfly2

    chown and file ownership

    superfly2, Jul 21, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    134
    J├╝rgen Exner
    Jul 22, 2004
  5. Tim O'Donovan

    chown recursively

    Tim O'Donovan, Jun 9, 2005, in forum: Perl Misc
    Replies:
    18
    Views:
    282
    Michael Zawrotny
    Jun 13, 2005
Loading...

Share This Page