Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Copy a directory and permission over the network

Posted on 2009-04-15
5
Medium Priority
?
269 Views
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
-Project
--Accounting
---Credits Memos
---AR
--Engineering
---design
---ATP
---Documents
---Hardware
---CAD Drawing
--Purchasing
---Bib Sheets
--Proposals
---RFQ
---Customer Requirements
--Sales
--Security


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.
0
Comment
Question by:steele2j
  • 3
  • 2
5 Comments
 
LVL 49

Accepted Solution

by:
Akhater earned 1000 total points
ID: 24153588
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"
0
 

Author Comment

by:steele2j
ID: 24162686
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.
0
 
LVL 49

Expert Comment

by:Akhater
ID: 24162833
can you give robocopy a go ?

robocopy /SEC to preserve permissions
0
 
LVL 49

Expert Comment

by:Akhater
ID: 24162865
also my best guess is that removing the /o from your xcopy will make it work
0
 

Author Closing Comment

by:steele2j
ID: 31570767
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.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

580 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