copy folders with same permissions of users and groups

This topic contains 2 replies, has 2 voices, and was last updated by  Ajay Sharma 1 year, 10 months ago.

  • Author
  • #49508

    Ajay Sharma

    Hi Everyone

    Please let me know whether powershell or python, which will be better to set permissions of groups and users on copy folders.
    I have copied folders from once location E:\IT_softwares to other location \\nas01\migration\IT_softwares

    this powershell ACl command is giving errors.

    Get-Acl E:\IT_softwares | Set-Acl \\nas01\migration\IT_softwares -confirm command gives error.

    Set-Acl : Attempted to perform an unauthorized operation.
    At line:1 char:94
    + Get-Acl E:\IT_Softwares\3DsMax2015\VirtualCloneDrive\SetupVirtualCloneDrive5470.exe | Set-Acl <<<< -path \\nasinnd01.ali.local\Migration_Test\Test\3DsMax2015\VirtualCloneDrive\ SetupVirtualCloneDrive5470.exe -confirm + CategoryInfo : PermissionDenied: (\\nasinnd01.ali...neDrive5470.exe:String) [Set-Acl], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand does robocopy or emcopy has any features that can copy same permissions from one location to other ?? thanks everyone for reading and answering my post.

  • #49527

    robocopy source destination /secfix /xo /xn /xc

    It's baked in to windows so you should be good to go off the bad.

    • This reply was modified 1 year, 10 months ago by  Anthony.
  • #49541

    Ajay Sharma

    Hi Anthony

    i was also considering icacls commands, i am testing this icacls and then i will post my conclusion.

    Request any member, who reads my post, please suggest any more ideas.


You must be logged in to reply to this topic.