I have an SSIS job that contains a script task. There is also a connection to another server within the package that can only be executed accessed by a specific user and the agent cannot be given read rights to the other server. So the solution to this is have the SQL job be run as the required user. The problem with this is this user does not have full control over the folder/file where the script task will be temporarily located while the code runs so I get a failure on the script task but if I run it in visual studio or with the normal agent account the script task executes successfully.
I have tried giving the user access to all major drives on the server but this has not solved the problem