Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: chown'ing by script

2 views
Skip to first unread message

Cameron Simpson

unread,
Jan 6, 2010, 1:29:10 AM1/6/10
to Victor Subervi, python-list
On 06Jan2010 01:21, Victor Subervi <victor...@gmail.com> wrote:
| 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?

Are you sure you don't want chmod?
--
Cameron Simpson <c...@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Winter is gods' way of telling us to polish.
- Peter Harper <bo...@freenet.carleton.ca> <har...@algonquinc.on.ca>

Carsten Haese

unread,
Jan 6, 2010, 1:41:57 AM1/6/10
to pytho...@python.org
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

alex23

unread,
Jan 6, 2010, 2:12:00 AM1/6/10
to
Carsten Haese <carsten.ha...@gmail.com> 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.

Steve Holden

unread,
Jan 6, 2010, 8:58:13 AM1/6/10
to pytho...@python.org
Victor Subervi wrote:
> On Wed, Jan 6, 2010 at 2:12 AM, alex23 <wuw...@gmail.com
> <mailto:wuw...@gmail.com>> wrote:
>
> Carsten Haese <carsten.ha...@gmail.com
> 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/

D'Arcy J.M. Cain

unread,
Jan 6, 2010, 9:46:33 AM1/6/10
to Steve Holden, pytho...@python.org
On Wed, 06 Jan 2010 08:58:13 -0500
Steve Holden <st...@holdenweb.com> 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 <da...@druid.net> | 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.

Steve Holden

unread,
Jan 6, 2010, 10:07:59 AM1/6/10
to D'Arcy J.M. Cain, pytho...@python.org
D'Arcy J.M. Cain wrote:
> On Wed, 06 Jan 2010 08:58:13 -0500
> Steve Holden <st...@holdenweb.com> 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.

0 new messages