Friday, August 1, 2014

How to find files that an account does not have permissions to. No Access. Denied Access.

The application used to replicate data for server replacements was having problems replicating all the data from the source server.  It turns out, the server owner had locked down certain files and folders, excluding the account used by the replication software.  This prevented the app from copying all the data.

I used AccessChk to determine offending files. This free tool can be downloaded from here:

http://technet.microsoft.com/en-us/sysinternals/bb664922.aspx

I copied the exe to the server and ran the following command:

accesschk.exe -n -s MyDomain\MyAccount d:\ > c:\noaccess.txt


-n  Show only objects that have no access
-s   Recurse

I then piped the output to a text file called noaccess.txt.

I ran this against a Windows 2008 server.  Unfortunately, there were so many offending files, it bonked out after the text file reached about 32MB.....  But it gave us a place to start.

Happy Hunting.

No comments:

Post a Comment