This one is a bit messy to explain but i've spent several hours on it without getting the point ...
I' ll try to describe the scenario:

The main script accepts some arguments and then creates a SWF (Macromedia Flash ) file in a world-writable folder .. This is mainly done using some powerful modules from cpan..(SWF:: / DATA::Temporary Bag / among others) so i'm not going to post the code.. Infact the program itself works. It works fine also triggered by a CGI script but only from the command line because, when in a browser, the system call that runs the mainscript returns an error ( log : Can't use an undefined value as a symbol reference at /Library/Perl/Data/TemporaryBag.pm line 202.)

Ok.. my question is : if it works from the command line is because the system knows it's me ($> ) and when in the browser the user is www.. So it's a permission issue with all the setuid consequences ?
I thougth it could be this because when triggered by a browser the program creates the SWF file anyway (which is chmoded 777) but the file is zero byte and it seems like the program can't write the binary stream into it. If i debug the process ( but i really don't know how to use the debugger) it seems that the problem occurs when the module tries to open a filehandle..

Bah...im really confused. I hope i gave enough informations to get some help thanks in advance
Katzuma

2001-12-10 Edit by Corion : Lowercased title and added formatting.


In reply to Do I need a setuid script ? by katzuma

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.