General discussion

Locked

Searching for permissions...

By jedavidow ·
I need to find all files in a directory tree that no longer have the "Everyone" "All access" permission.

Is this possible? How do I do it? Thanks.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Searching for permissions...

by BeerMonster In reply to Searching for permissions ...

Hi, copy the below into a batch file, change the directory name to the directory you want to check. check also that when you copy it over that the lines - esp the rem comments - haven't been wrapped round to the line below. Have fun....

rem (c) The Beermonster 2002
If exist c:\filelist.txt del c:\filelist.txt

rem get a list of the files and directories
rem within the target directory
dir c:\mydirectory\ /s /b > cacltest.txt

rem parse that list for each entry and pass it to rem the sub procedure
for /F "tokens=*" %%A in (c:\cacltest.txt) do call :go "%%A"
goto end


rem use cacls to check the perms,
rem if the everyone group with full perms is not rem found,
rem echo the file or directory name to a txt file.
:go
cacls %1 | find /I "Everyone:F"
If "%errorlevel%"=="0" got end
echo %1 >> c:\filelist.txt
:end

Collapse -

Searching for permissions...

by jedavidow In reply to Searching for permissions ...

Sorry, that searches on attributes- not NTFS permissions.

Collapse -

Searching for permissions...

by jedavidow In reply to Searching for permissions ...

This question was closed by the author

Back to Windows Forum
3 total posts (Page 1 of 1)  

Related Forums