At the risk of seeming thick, what errors are showing in your web server logs?

The last line of your post is very telling to me. If a script works fine from the command line and doesn't from the CGI environment then the first thing I think of being wrong is permissions. Web servers (and hence the CGI scripts which become child processes of the web server process) tend to run as an unprivileged user.

You haven't specified what operating system this is all running under but based on your file path notations I'm going to presume it is a flavor of Unix or Linux.

Quite often web servers are run as the user id "nobody" which typically has no permissions on the system at all. Other implementations include using the userid of "apache", "www" or "web" or some derivation thereof.

Check the ownership and permissions of both the upload directory in question and the file in question. Check what userid your web processes are running as. Make sure the permissions of the files and directories match the userid that the web processes are running as.


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

In reply to Re: The System function and its usage by blue_cowdawg
in thread The System function and its usage by Structed

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.