We have the following batch file executing successfully when the user is set to an Admin on the windows server:
scpg3 nbsoqmt@reportnetsql:/out/IMAssociateRpt/As* L:ArmadilloFlat_files
The problem is, as soon as we remove the Admin rights from the user, the batch file fails. Are there specific files/directies that our non-admin account needs access to in order to successfully run the batch file? We have multiple other batch files (for different purposes) that run successfully under the non admin account. We can't seem to get this to work. Please advise
asked Aug 04 '11 at 22:58
Is L a mapped drive? Are the other scripts (the ones that are succeeding) also using mapped drives? If running as a scheduled task the mapped drive might not be available at that stage since I believe these are mapped only after user login.
Could you try using the full share name as destination?
Additionally if the destination share is within a domain does it have the correct permissions for non-admins to write to it? You could first try to get the scheduled task to copy the file to another folder in the same host just to rule out any possible share/permission problems first.
Also I suppose the scheduled task is running under a specified user account and not SYSTEM. There should not be any specific files/directories that require admin access for something like this to work.
Another thing to try is to add the batch mode option -B so that in case the script is failing due to requiring user interaction it will now fail with an error message instead of just hanging and waiting for input.
Finally if all else fails, I would recommend starting from scratch with a non-admin account rather than with an admin account and then removing the privileges. This makes troubleshooting permission related problems easier.
answered Aug 05 '11 at 08:23