0

It seems that NTFS rules take precedence over Robocopy when copying folders from one volume to another. Is there a way around this?

Example: Copying a folder from one volume to another using the Robocopy /COPYALL switch should copy across all of the file info. This is equivalent to /COPY:DATSOU with the S being NTFS ACL's (SS64 Robocopy). However, when I execute the Robocopy command, the resulting ACL on the destination folder represents the parent, which is in line with the NTFS rule of moving files between volumes results in the destination inheriting permissions from its parent (GlobalScape.com).

Folder structure of the source is: \Sector\Customer\Project with each project folder having (amongst others) a Data In and Data Out folder. Each project folder will have slightly differing permissions based on which groups are working on the project.
Folder structure of the destination is similar but as the destination is an archive location for the source, some of the project folders are not there.

We want to copy the project Data In and Data Out folders which are in the source but not the destination across, maintaining the permissions and creating the project folder itself if it doesn't exist, and then copy all of the files in the Data In and Data Out folders which are older than 'x' maintaining permissions on the files too.

Is this a case of creating the destination folder structure first, setting the correct permissions and then copying the data?

Rich M
  • 273
  • 2
  • 15
  • Are you saying that the permissions from the root drive/directory are getting inherited? Why not just copy everything over and then remove inherited users? – Joe Oct 10 '19 at 13:45
  • Hi Joe, our ultimate aim is: We have a source share with very complex folder and permissions structure which contains project folders. Within these project folders are the target folders. The destination share has a very similar folder and permission structure but is an archive location for the source, so the contents are not the same. The aim is to move the target folders and files to the archive without disrupting what is already there and maintain the permissions on the folders we move. In some cases, the target locations will already have the same folder so we just want to move the files. – Rich M Oct 10 '19 at 14:12
  • Robocopy can only copy permissions if it has administrator rights; did you run it from an elevated ("run as administrator") command window? (And if the source and/or destination are on the network, you must have administrator rights on the local machine, on the source, *and* on the destination.) – Harry Johnston Oct 12 '19 at 20:55
  • 1
    ... I've just done a quick experiment and for me, at least, robocopy worked in the way you desire, i.e., ignored the destination's parent directory permissions. – Harry Johnston Oct 12 '19 at 20:56
  • Thanks @HarryJohnston. I'm running RC with a Domain Admin account. I've also noticed something else: When copying just the folders (no files, using the ```/XF *.*``` switch), the permissions copy correctly but when copying folder and files, they do not. – Rich M Oct 14 '19 at 12:57

0 Answers0