Announcement

Collapse
No announcement yet.

Folder Security

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Folder Security

    I created the following batch file to copy all user docs from one Dc to another and it is setup using scheduled tasks.

    @echo off
    xcopy D:\Users\*.* \\STC-rack1\Users /s/e/c/v/h/r/y

    The process works fine, My problem is once the folders copy over the folder security defaults back to the uers group having access again, and the orignal folders only have the individual user and admin with rights?

    Is there a strp I'm missing on this script that will copy over the folder security settings.

    Thanks

  • #2
    Re: Folder Security

    /X is missing.
    However Robocopy is more easier

    Ps, have a read on this
    http://www.geekshangout.com/?q=node/15

    Edit:
    I deleted your Double post in the scripting forum.
    read the forum rules again. I assume you already should have read them.
    Last edited by Dumber; 17th November 2008, 15:25.
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      Re: Folder Security

      Originally posted by Dumber View Post
      /X is missing.


      Edit:
      I deleted your Double post in the scripting forum.
      read the forum rules again. I assume you already should have read them.
      I thought /X copies the audit settings, although it implies /O which copies File ownership and ACL information.

      Cheers
      Caesar's cipher - 3

      ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

      SFX JNRS FC U6 MNGR

      Comment


      • #4
        Re: Folder Security

        And that's why I believe /X should be enough
        However you can add /O if you want

        Edit:
        all the switches explained on a dutch site (translated with google )
        http://translate.google.com/translat...-8&sl=nl&tl=en
        Original site: http://www.computerwoorden.nl/direct--13812--XCOPY.htm
        Last edited by Dumber; 17th November 2008, 15:43.
        Marcel
        Technical Consultant
        Netherlands
        http://www.phetios.com
        http://blog.nessus.nl

        MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
        "No matter how secure, there is always the human factor."

        "Enjoy life today, tomorrow may never come."
        "If you're going through hell, keep going. ~Winston Churchill"

        Comment


        • #5
          Re: Folder Security

          Thanks for your help and thanks for removing the double post, it wont happen again.

          Comment


          • #6
            Re: Folder Security

            You're welcome and welcome
            Marcel
            Technical Consultant
            Netherlands
            http://www.phetios.com
            http://blog.nessus.nl

            MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
            "No matter how secure, there is always the human factor."

            "Enjoy life today, tomorrow may never come."
            "If you're going through hell, keep going. ~Winston Churchill"

            Comment


            • #7
              Re: Folder Security

              @Dumber

              /X should be more that enough because it includes /O so we settle it for "Any of them will do"

              @ccbklyn

              I'd also check the Xcopy switches you already use because you have got two conflicting ones there namely /S and /E.
              Check Xcopy /? for more info.

              Cheers
              Caesar's cipher - 3

              ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

              SFX JNRS FC U6 MNGR

              Comment


              • #8
                Re: Folder Security

                Don't want to spoil the XCopy party, but I do think you should stick with Dumber's earlier advice: Robocopy.
                See this post for more details: http://forums.petri.com/showpost.php...65&postcount=2 .

                Sorin Solomon


                In order to succeed, your desire for success should be greater than your fear of failure.
                -

                Comment


                • #9
                  Re: Folder Security

                  I second and third the recommendation for robocopy. Free download from MS.
                  Gareth Howells

                  BSc (Hons), MBCS, MCP, MCDST, ICCE

                  Any advice is given in good faith and without warranty.

                  Please give reputation points if somebody has helped you.

                  "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

                  "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

                  Comment


                  • #10
                    Re: Folder Security

                    I also recommend robocopy. Using the /mir will get the permissions.
                    GoogleFu is strong with this one ^

                    Comment


                    • #11
                      Re: Folder Security

                      Ok, I downloaded rktools.exe to E:\Program Files\Windows Resource Kits\Tools, I clicked on robocopy.exe, it flashed quick but nothing happened, Should I be clicking on a different icon, is this a GUI interface or do I need to download the Utility spot;ight, I tried from the last link but no good

                      Thanks

                      Comment


                      • #12
                        Re: Folder Security

                        To my knowledge, robocopy is a CLI tool, so you'll have to either drop robocopy (or it's shortcut) in a folder that is in your 'PATH' global variable or open up cmd and navigate to the E:\Program Files\Windows Resource Kits\Tools directory and run it from there. As you mentioned, the Utility Spotlight is also a possibility if you need a GUI. FYI, robocopy is included in Vista by default.

                        EDIT: Link for Robocopy GUI: http://download.microsoft.com/downlo...ght2006_11.exe
                        Last edited by Nonapeptide; 17th November 2008, 18:10.
                        Wesley David
                        LinkedIn | Careers 2.0
                        -------------------------------
                        Microsoft Certifications: MCSE 2003 | MCSA:Messaging 2003 | MCITP:EA, SA, EST | MCTS: a'plenty | MCDST
                        Vendor Neutral Certifications: CWNA
                        Blog: www.TheNubbyAdmin.com || Twitter: @Nonapeptide || GTalk, Reader and Google+: [email protected] || Skype: Wesley.Nonapeptide
                        Goofy kitten avatar photo from Troy Snow: flickr.com/photos/troysnow/

                        Comment


                        • #13
                          Re: Folder Security

                          Robocopy is also a Command line tool just like what Xcopy is.
                          One of my personal favourites according Robocopy is that you can start copying in backup mode so you can copy files even when their in use.
                          Also you can use a switch which gives you the ability to have a restartable mode. So even if your network has a small hitch, it won't give a problem.

                          Their is a very very good manual included in the folder where robocopy can be found.
                          I really suggest reading that
                          Marcel
                          Technical Consultant
                          Netherlands
                          http://www.phetios.com
                          http://blog.nessus.nl

                          MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
                          "No matter how secure, there is always the human factor."

                          "Enjoy life today, tomorrow may never come."
                          "If you're going through hell, keep going. ~Winston Churchill"

                          Comment


                          • #14
                            Re: Folder Security

                            S'true, robocopy is teh pwn. Kinda like the Microsoft's version of RSync (or maybe not ). As long as we're trading personal favorites, my favorite feature is the mirror command. Here's some good reading for you ccbklyn:

                            ss64's help page for robocopy (I think it's just a copy of Robocopy's /? screen)
                            Robocopy's bigger manual
                            Wikipedia's Robocopy entry (might be worth it to read some of the references)
                            Wesley David
                            LinkedIn | Careers 2.0
                            -------------------------------
                            Microsoft Certifications: MCSE 2003 | MCSA:Messaging 2003 | MCITP:EA, SA, EST | MCTS: a'plenty | MCDST
                            Vendor Neutral Certifications: CWNA
                            Blog: www.TheNubbyAdmin.com || Twitter: @Nonapeptide || GTalk, Reader and Google+: [email protected] || Skype: Wesley.Nonapeptide
                            Goofy kitten avatar photo from Troy Snow: flickr.com/photos/troysnow/

                            Comment


                            • #15
                              Re: Folder Security

                              One of the most valuable tools to come out of Microsoft
                              Gareth Howells

                              BSc (Hons), MBCS, MCP, MCDST, ICCE

                              Any advice is given in good faith and without warranty.

                              Please give reputation points if somebody has helped you.

                              "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

                              "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

                              Comment

                              Working...
                              X