SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Permission Denied to Hidden Folder
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jbates99
Constraint Violating Yak Guru

385 Posts

Posted - 04/19/2013 :  17:15:36  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
1635 Posts

Posted - 04/23/2013 :  21:07:41  Show Profile  Click to see yosiasz's MSN Messenger address  Reply with Quote
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

USA
2 Posts

Posted - 04/29/2013 :  15:08:50  Show Profile  Visit polczym's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000