in reply to Find perls user account on windows
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!
|
|---|