Your quest to find out which account perl runs as on the Win2003 box can be answered by looking at the process as was suggested by jethro. Then, as you correctly have assumed, the account must have "system" privileges or at least have permission to access the directories in question, in order to run on the windows box. On winserver boxes starting with Server2000, the whole directory/file access mechanism was re-configured to run through the security protocols in order to control who can see and access what based on access groups and privileges/permissions. It's a MS Server2003 thing.

You stated it yourself that when the script ran through the command line it all worked fine, and did so because you are logged in with an account that has high enough privileges to do so without question (Admin privileges, maybe?). But assigning "system" or "Admin" privileges is NOT the best solution as far as security goes. It would be better to first find the account being used (Use jethro's suggestion for that), go to the directories that need access (And, make sure you want to grant access to the script for this), and simply add the user account to the list of accounts that have permission to access the directory and all its sub-directories as needed. This way you can control the scope of the machine that is used by your script, and control the scope of the machine that is vulnerable as well.

Good Luck!


In reply to Re: Find perls user account on windows by Sagacity
in thread Find perls user account on windows by Passenger

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.