Security Problem with after DOS copy

Posted on 2006-05-18
Last Modified: 2010-04-18
For the history of the issue see the following link.

After the folders are copied for the user, the user's own permissions on the folders are removed so they don't have access to them. Is there a way to keep the permissions on the folders after they have been copied?

Question by:mascoloj
    LVL 5

    Expert Comment

    The copy command doesn't keep the permissions.  If you move the files the permissions are kept.  I will see if there is a way around this.
    LVL 51

    Expert Comment

    Use XCOPY with the /X switch as one of the switches.  Replace your copy command with the xcopy command in that batch file.


    Author Comment

    I'll try the /x switch tomorrow when I get back to work. Thanks

    LVL 21

    Expert Comment

    You want to replace

    copy \\server\sourcefolder c:\destfolder


    xcopy /e /o \\server\sourcefolder c:\destfolder

    /x will only copy audit info
    LVL 51

    Accepted Solution

    /x also implies /o - so you'll get /o automatically.


    Author Comment

    Thanks guys. I put in the /x switch and it worked great.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
    On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 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

    14 Experts available now in Live!

    Get 1:1 Help Now