Re: Folder depth & cacls



On Fri, 15 Jul 2005 02:15:02 -0700, JAR <JAR@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>I am trying to edit the permissions of two folder trees (on 2 servers) using
>either cacls or xcacls (want to add permissions for a specific group so don't
>want to use the GUI) and am hitting a problem related to the folder depth
>and/or path length. The process runs so far but then fails and I'm pretty
>sure it's related to the depth of some folders.
>
>Getting either "The data area passed to a system call is too small" or "The
>filename, directory name, or volume label syntax is incorrect." dpending on
>which server I run it on.
>
>If I knew that it was only affecting a couple of folders I would just go
>down one level and run the command there but I know this is NOT the case as
>there are a LOT of folders to run through.
>
>Does anyone have any ideas for a workaround for this - maybe using a script
>or something ?
>
>Thanks
>
>

See if something like this works:

@echo off
setlocal
set work=C:\Folder
pushd "%work%"
@echo Y| CALCS "%work%" /E /C /G ....
for /f "Tokens=*" %%a in ('dir /b /a /s') do (
call :sub "%%a"
)
endlocal
goto :EOF
:sub
set fold=%~DP1
if /i "%fold%" EQU "%work%" goto sub1
pushd "%fold%"
set work=%fold%
@echo Y| CALCS "%work%" /E /C /G ....
:sub1
set file=%~nx1
@echo Y| CALCS "%file%" /E /C /G ....
..
.



Relevant Pages

  • Re: 2000 server is losing data files
    ... We have a client that has both a 2000 & a 2003 server that are not on ... When this occurs it is random as to how many folders it will zap. ... We manage a large number of servers and have never come across ... When you say you've ruled out users deleting them, ...
    (microsoft.public.security)
  • Re: Cannot add users from trusted domain
    ... Windows 2003 domain to any folders. ... on these servers, but we cannot add any new ones. ... Were you able to add the Windows 2003 AD Domain Admins tothe NT4 ... This is a direct link to the Microsoft Public ...
    (microsoft.public.win2000.active_directory)
  • Re: Active directory
    ... already tried or do not have permissions to access. ... Generally you use AD to manage the user accounts that access shares on the ... With a domain you generally put the shared folders on servers and use the AD ...
    (microsoft.public.windows.server.active_directory)
  • Network Shared Files/UNC
    ... issues regarding our network security. ... GPO settings are not inherited from the domain GPO ... folders of our servers by just running Notepad and going ... another way of tightening security so that the Servers are ...
    (microsoft.public.win2000.active_directory)
  • Re: Folder depth & cacls
    ... call:sub "%%a" ... >either cacls or xcacls (want to add permissions for a specific group so don't ... >sure it's related to the depth of some folders. ...
    (microsoft.public.windows.file_system)