1

When doing a "Operation: Copy file" using a "File System Task", is it possible to preserve the "Owner" attribute on the file?

What happens: The destination file gets the "Owner" as the user running the SSIS-package.

What I want: Keep the original owner as the owner of the copied file.

Bassebus
  • 163
  • 1
  • 4

1 Answers1

2

As I understand it, a copied file is considered to be a new entity, and therefore its owner will be the user or process that created it. Interestingly, a moved file will retain all of its attributes.

If moving (rather than copying) is an option, that should work for you. If not, you'll have to find a way to change the attributes on the newly copied file. Some copy utilities (such as Robocopy) have switches that allow you to retain some or all of the attributes. I'm not that familiar with SSIS, but maybe there's a way to call a batch file rather than use the native copy command?

Charles Burge
  • 768
  • 6
  • 16
  • I have only spent like 5 hrs in SSIS but I think that running a batch file will be no problems, but it introduces external dependencies and increases complexity, therefore I hoped to be able to do it "natively" in SSIS. – Bassebus Mar 22 '16 at 14:36