Xcopy /O Fails With ImpersonateLoggedOnUser

From: Phillip Galey (pgaley_at_starcalif.com)
Date: 02/19/04


Date: Thu, 19 Feb 2004 12:59:12 -0800

We're trying to copy folders, including ACLs, from one place to another on a
Windows 2000 Server. We've created a user that has the right to copy
folders, including ACLs. We're using the XCOPY command with the /O option
to signify that ACLs are to be included:

XCOPY /O /E /T /I FromPath ToPath

This command works wonderfully if authenticated using NET USE. However, if
instead of using NET USE, we use LogonUser and ImpersonateLoggedOnUser, then
the xcopy command fails because for some reason the right to write ACLs is
no longer there.

Is there a way to get the above command to work using impersonation? We
need to avoid using NET USE because it doesn't have the security
characteristics we need (it provides access outside of the program).
Thanks.

Phil



Relevant Pages

  • Re: DFS
    ... You can use ACLs to set NTFS permissions on these files and ... folders, so users will not be access anything they shouldn't have access to. ... > fault tolerance, can get this working all fine. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Moving folders with content
    ... I'm simply wanting to move folders from various ... servers to the hard drive and then back to different directories on the ... the resource fork and other metadata are not used. ... On Windows, file owners, ACLs and alternate data ...
    (comp.lang.python)
  • Re: Hoping to get some help with copying permissions for folders/subfolders..
    ... root of the destination directory that wasn't in the source ... source set of folders/subfolders to a destination folder that has the ... same set of folders/subfolder setup but with in those folders there ... Check the two or three ACLs. ...
    (microsoft.public.windows.server.general)
  • Re: Manage file permission of a file on a shared folder
    ... In the old days we always used to make shares "Everyone:Full Control" and then use ACLs on the files and folders, but under win2k3 the default has changed. ... One of the issues I do not completely undertand is the 'ManagementPath' object, where you have to specify a Server, RelativePath and a NamespacePath. ...
    (microsoft.public.win32.programmer.wmi)
  • Adding a user to windows 2000
    ... Is there a way to add a user to the Windows 2000 security database? ... been able to assign acls to files and folders and change permissions but I ...
    (microsoft.public.win32.programmer.kernel)