Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Permission Denied to Hidden Folder

Author  Topic 

jbates99
Constraint Violating Yak Guru

396 Posts

Posted - 2013-04-19 : 17:15:36
hi experts,

My VB Script task is failing on this line:

objFSO.MoveFile("\\DynamicsTestSQL\C$\SL\Import\APFilesPending\*.csv", "\\DynamicsTestSQL\DSSI_CVD_APInv\FileDrop\")

This is a hidden folder. Would that have anything to do with the Permission Denied error?
Thanks, Jack


It works when the destination path is another server.



Error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Security.SecurityException: Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED)
at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
at ST_b8ce933391f145c3b3883762aa846378.vbproj.ScriptMain.Main()
The Zone of the assembly that failed was: MyComputer

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2013-04-23 : 21:07:41
how is this script being run? in SQL job or ssis package? what security context is this vb script being run?

<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page

polczym
Starting Member

2 Posts

Posted - 2013-04-29 : 15:08:50
quote:
Originally posted by yosiasz

how is this script being run? in SQL job or ssis package? what security context is this vb script being run?

I agree with this answer. You have multiple options to select which security context the Job/Package will be run under. Also be aware of which version of Windows you are using, and if any GPOs are in place that could impact the desired results.
<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion



Mark W. Polczynski
Go to Top of Page
   

- Advertisement -