Link to home
Start Free TrialLog in
Avatar of MECIT
MECITFlag for United States of America

asked on

Find permissions on directories

We have a windows server 2003 file server that I will be virtualizing into a windows 2008 file server.

We have permissions throughout directories , sub directories and even files. I am looking for a way to run a report that shows me all these permission to be able to put in place on the 2008 server.
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MECIT

ASKER

Could you guys kind of walk me through robocopy since i have never used it.

Would I run robocopy on the new server or old server?

old server data is on e:\\data1
new server data on e:\\data1

can I move one folder at a time to see how it works?
Avatar of MECIT

ASKER

i downloaded dumpsec.How do I run it ?
Avatar of oBdA
oBdA

robocopy has a slightly different syntax than copy or xcopy, it expects the source folder as first argument, then the target folder as second argument, then the other options.
Run it on the W2k8, robocopy comes with it; on W2k3, it was part of the ResKit.
Example to mirror a complete share, logging only errors to robocopy.log:
robocopy.exe "D:\New\Server" "\\OldServer\OldShare" *.* /mir /r:0 /w:0 /nfl /ndl /np /tee /log:D:\Temp\robocopy.log

Open in new window

For test, you can use "/L", which will only log/show what would be copied, but not actually do anything for real, and "/LEV:x", which will only copy the first x levels of folders.

You can install the DumpSec download on any machine, uncheck Hyena during setup, then copy DumpSec.exe and the help file to wherever you need it.
Avatar of MECIT

ASKER

Would this be right:

robocoy.exe "E:\Data1\All Managers" "\\mecx2\data1\All Managers" *.* /mir /r:0 /nfl /ndl /np /tee /log:E:\Temp\robocopy.log

I only want to copy one directory from the old server to the new server.
Mostly, if you're running this on the old server and want to copy the "all managers" folder.
Sorry, forgot the copying of the permissions above; add /copyall
robocoy.exe "E:\Data1\All Managers" "\\mecx2\data1\All Managers" *.* /copyall /mir /r:0 /nfl /ndl /np /tee /log:E:\Temp\robocopy.log

Open in new window

Avatar of MECIT

ASKER

The way I wrote was from the new server to the old server so I would need to run it from the 2003 server.

All my data is coming from the 2003 server and going to the 2008 server.
So where would I run the robocoy again.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MECIT

ASKER

This is what I got when running the command

C:\>robocopy.exe "\\mecx2\data1\All Managers" "E:\data1\All Managers" *.* /copya
ll /mir /r:0 /nfl /ndl /np /tee /log:E:\Temp\robocopy.log

2011/10/29 11:31:01 ERROR 3 (0x00000003) Opening Log File E:\Temp\robocopy.log
The system cannot find the path specified.

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows

-------------------------------------------------------------------------------

  Started : Sat Oct 29 11:31:01 2011

   Source - \\mecx2\data1\All Managers\
     Dest - E:\data1\All Managers\

    Files : *.*

  Options : *.* /NDL /NFL /TEE /S /E /COPYALL /PURGE /MIR /NP /R:0 /W:30

------------------------------------------------------------------------------

ERROR : Invalid Parameter #11 : "/log:E:\Temp\robocopy.log"

       Simple Usage :: ROBOCOPY source destination /MIR

             source :: Source Directory (drive:\path or \\server\share\path).
        destination :: Destination Dir  (drive:\path or \\server\share\path).
               /MIR :: Mirror a complete directory tree.

    For more usage information run ROBOCOPY /?


****  /MIR can DELETE files as well as copy them !

C:\>
Avatar of MECIT

ASKER

I created the TEMP folder on the E: and ran the commmand again.
Avatar of MECIT

ASKER

it worked. How do I know the permissions stayed intacted
The folder E:\Temp probably does not exist.
Note that after the copy, "E:\data1\All Managers" will be (due to "/mir") an EXACT copy of "\\mecx2\data1\All Managers".
If there were no errors reported, just check a few folders on the target folder; permissions there should be the same as on the equivalent source folder.
Avatar of MECIT

ASKER

So I can continue using this format but just change ther folder names. will it overwrite the log or add to the log.
Avatar of MECIT

ASKER

if I have a directory that is about 50G, will this process make the copying faster or should I do one sub folder at a time.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MECIT

ASKER

is there something i can add to view the status while it is coping.

Also I am getting some Error 5 access denied . doe this mean it will not copy over
You can remove the /nfl and /ndl options, which will cause robocopy to log any file or folder copied, but that makes it harder to find errors in the log.
If access is denied on a source file or folder, then yes, it will not be copied; you'll have to correct the permissions first.
Another reason for "access denied" can be if the file is open; in this case, simply run the script again once the files have been closed.
Avatar of MECIT

ASKER

I have the aministrator account, domain admins and they have full control but I still get access denied.

How can i give myself access to copy it over?
Avatar of MECIT

ASKER

I think i found the issue. on some of the subfolders there are differents users as the owner.

If I change that to administrator will this allow me to copy over.  Once Im done can I change it back to the users as the owner.
You can try to take ownership and give it back, but if you indeed have full access, that should work without taking ownership. Again: make sure you open the command prompt on the W2k8 machine using "run as administrator".
Avatar of MECIT

ASKER

I am running it under administrator. I took ownership .

Getting

Error 5 - Copying NTFS Security to destination.
Access denied
Avatar of MECIT

ASKER

tried both way and still get the access denied
Avatar of MECIT

ASKER

I had to change the ownership on both directories on the old server and the new since it kept the settings when it copied it over.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MECIT

ASKER

Thank you for helping me.