Copy a directory and permission over the network

Posted on 2009-04-15
Last Modified: 2012-05-06
I need to find a way to allow users to copy a directory and the AD security into a new directory. The users will need to do this from their workstation to the mapped network drive. (2003 Servers)

I have a customer directory "g:\Customer-Projects\

and a template, under the template there are several levels of directories that need to be copied (there may be files in some of the directories but not all).

Customer Template
---Credits Memos
---CAD Drawing
---Bib Sheets
---Customer Requirements

xcopy /S /I /E /O /A /T "G:\Customer-Project\Customer Template\*" "G:\Customer-Project\New"

I have tried XCOPY and this works as long as I run it as an administrator, however If I run it from the workstation I am told the following

access denied
Unable to create directory - g:\customer-project\new\project

It accreated the project directory but nothing below that level.

I have check to verify that I have permissions in that and all lower level directories and I get the same thing.

When I run the same xcopy compand on local to local or server to local I have no issues. It is only when I atempt to place the copied files onto the server.

My goal is to have a program that the user can click on and do this for either a new customer or a new project in an existing customer.
Question by:steele2j
    LVL 49

    Accepted Solution

    what are the permissions of the "G:\Customer-Project\New" ?

    moreover make sure that you SHARED permissions is "everyone full control" by default it is "everyone read"

    Author Comment

    I have set the Shared permissions to full control and now get the following"

    C:\Documents and Settings\jsteele>xcopy /S /I /E /O /A /T "\\secure-server-2\files\Customer-Project\Customer Template\*" "\\secure-server-2\files\Customer-Project\Raytheon Systems"
    File creation error - This security ID may not be assigned as the owner of this object.

    Unable to create directory - \\secure-server-2\files\Customer-Project\Raytheon Systems\Project

    I get the same message even if I have taken ownership of the files and ensure I have Shared and Security  permissions to set to full control.
    LVL 49

    Expert Comment

    can you give robocopy a go ?

    robocopy /SEC to preserve permissions
    LVL 49

    Expert Comment

    also my best guess is that removing the /o from your xcopy will make it work

    Author Closing Comment

    This exnded up being the issue after all. I tested it on anouther server with a clean share and it worked. The share permissions passed down caused the issue.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now