Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Xcacls switchs / file permission inheritance

Reply
Thread Tools Display Modes

Xcacls switchs / file permission inheritance

 
 
magnum42
Guest
Posts: n/a

 
      04-30-2010

Hi,

I have a problem with xcacls.vbs
We have 2 groups ready for each folder (one for Read, one for Modification
permissions).

For example :
Fold1
Fold2
Fold2_Sub1
Fold2_Sub2
Fold_2_Sub2_Sub1
Fold_2_Sub2_Sub2
....
cscript xcacls.vbs "\\server\g$\Share\Fold1" /E /G "DOM\Fold1-R":X /F
cscript xcacls.vbs "\\server\g$\Share\Fold1" /E /G "DOM\Fold1-M":M /F
cscript xcacls.vbs "\\server\g$\Share\Fold2" /E /G "DOM\Fold2-R":X /F
cscript xcacls.vbs "\\server\g$\Share\Fold2" /E /G "DOM\Fold2-M":M /F
cscript xcacls.vbs "\\server\g$\Share\Fold2\Fold2_Sub1" /E /G
"DOM\Fold2_Sub1-R":X /F
cscript xcacls.vbs "\\server\g$\Share\Fold2\Fold2_Sub2" /E /G
"DOM\Fold2_Sub2-M":M /F
....

Why I do this, the read and change groups are ok on the first level, but the
go down every level on the files.
We also tried using the "/SPEC D" switch, but the permissions continue to
inherit every level, most of the time only on the files.

Each folder needs to have their two groups (read and change), but nothing
should inherit down to subfolders, except for the security ACE's put on top,
on the share itself.


I'm tired (and french), so I hope I'm clear enough. Please help.

Thanks a lot.

--
Franck
http://supermarches.faire-le-bon-choix.fr
 
Reply With Quote
 
 
 
 
magnum42
Guest
Posts: n/a

 
      05-05-2010
Hi,

OK, I found the solution for my problem.
I new xcacls.exe had been "replaced" by xcacls.vbs, but apparently,
xcacls.vbs has now been "replaced" by icacls.exe ... at least for Windows
Server 2008 (my server). Confusing ...

So it works perfectly with icacls :
Read :
icacls \\server\g$\Services\DFSP /grant DL-S-Services.DFSP-LOI)(NP)RX
Write :
icacls \\server\g$\Services\DFSP /grant DL-S-Services.DFSP-MOI)(NP)M

These are the correct options (for my needs listed in my frst post).

BTW, watch out for the switchs. For example, the change/modify permission is :
xcacls.exe : C (Change)
xcacls.vbs : M (Modify)
icacls.exe : M (Modify)


--
Franck
http://supermarches.faire-le-bon-choix.fr


"magnum42" wrote:

> Hi,
>
> I have a problem with xcacls.vbs
> We have 2 groups ready for each folder (one for Read, one for Modification
> permissions).
>
> For example :
> Fold1
> Fold2
> Fold2_Sub1
> Fold2_Sub2
> Fold_2_Sub2_Sub1
> Fold_2_Sub2_Sub2
> ...
> cscript xcacls.vbs "\\server\g$\Share\Fold1" /E /G "DOM\Fold1-R":X /F
> cscript xcacls.vbs "\\server\g$\Share\Fold1" /E /G "DOM\Fold1-M":M /F
> cscript xcacls.vbs "\\server\g$\Share\Fold2" /E /G "DOM\Fold2-R":X /F
> cscript xcacls.vbs "\\server\g$\Share\Fold2" /E /G "DOM\Fold2-M":M /F
> cscript xcacls.vbs "\\server\g$\Share\Fold2\Fold2_Sub1" /E /G
> "DOM\Fold2_Sub1-R":X /F
> cscript xcacls.vbs "\\server\g$\Share\Fold2\Fold2_Sub2" /E /G
> "DOM\Fold2_Sub2-M":M /F
> ...
>
> Why I do this, the read and change groups are ok on the first level, but the
> go down every level on the files.
> We also tried using the "/SPEC D" switch, but the permissions continue to
> inherit every level, most of the time only on the files.
>
> Each folder needs to have their two groups (read and change), but nothing
> should inherit down to subfolders, except for the security ACE's put on top,
> on the share itself.
>
>
> I'm tired (and french), so I hope I'm clear enough. Please help.
>
> Thanks a lot.
>
> --
> Franck
> http://supermarches.faire-le-bon-choix.fr

 
Reply With Quote
 
magnum42
Guest
Posts: n/a

 
      05-08-2010
OK, juste a last little update to my post, with what I finally did, if
someone's interested :

On the nodes (so people cannot create files and folders) :
icacls G:\Services\DFSP /grant DL-S-Services.DFSP-LOI)(NP)(IO)(RX)
icacls G:\Services\DFSP /grant DL-S-Services.DFSP-MOI)(NP)(IO)(M)
icacls G:\Services\DFSP /grant DL-S-Services.DFSP-LS,RD,X)
icacls G:\Services\DFSP /grant DL-S-Services.DFSP-MS,RD,X)

On the "leaves" (last folders) so people CAN create new folders/files :
icacls G:\Services\DFSP\DAF\CDG /grant
DL-S-Services.DFSP.DAF.CDG-LOI)(CI)(IO)(RX)
icacls G:\Services\DFSP\DAF\CDG /grant
DL-S-Services.DFSP.DAF.CDG-MOI)(CI)(IO)(M)
icacls G:\Services\DFSP\DAF\CDG /grant DL-S-Services.DFSP.DAF.CDG-LS,RD,X)
icacls G:\Services\DFSP\DAF\CDG /grant
DL-S-Services.DFSP.DAF.CDG-MS,RD,WD,AD,X)


--
Franck
http://supermarches.faire-le-bon-choix.fr


"magnum42" wrote:

> Hi,
>
> OK, I found the solution for my problem.
> I new xcacls.exe had been "replaced" by xcacls.vbs, but apparently,
> xcacls.vbs has now been "replaced" by icacls.exe ... at least for Windows
> Server 2008 (my server). Confusing ...
>
> So it works perfectly with icacls :
> Read :
> icacls \\server\g$\Services\DFSP /grant DL-S-Services.DFSP-LOI)(NP)RX
> Write :
> icacls \\server\g$\Services\DFSP /grant DL-S-Services.DFSP-MOI)(NP)M
>
> These are the correct options (for my needs listed in my frst post).
>
> BTW, watch out for the switchs. For example, the change/modify permission is :
> xcacls.exe : C (Change)
> xcacls.vbs : M (Modify)
> icacls.exe : M (Modify)
>
>
> --
> Franck
> http://supermarches.faire-le-bon-choix.fr
>
>
> "magnum42" wrote:
>
> > Hi,
> >
> > I have a problem with xcacls.vbs
> > We have 2 groups ready for each folder (one for Read, one for Modification
> > permissions).
> >
> > For example :
> > Fold1
> > Fold2
> > Fold2_Sub1
> > Fold2_Sub2
> > Fold_2_Sub2_Sub1
> > Fold_2_Sub2_Sub2
> > ...
> > cscript xcacls.vbs "\\server\g$\Share\Fold1" /E /G "DOM\Fold1-R":X /F
> > cscript xcacls.vbs "\\server\g$\Share\Fold1" /E /G "DOM\Fold1-M":M /F
> > cscript xcacls.vbs "\\server\g$\Share\Fold2" /E /G "DOM\Fold2-R":X /F
> > cscript xcacls.vbs "\\server\g$\Share\Fold2" /E /G "DOM\Fold2-M":M /F
> > cscript xcacls.vbs "\\server\g$\Share\Fold2\Fold2_Sub1" /E /G
> > "DOM\Fold2_Sub1-R":X /F
> > cscript xcacls.vbs "\\server\g$\Share\Fold2\Fold2_Sub2" /E /G
> > "DOM\Fold2_Sub2-M":M /F
> > ...
> >
> > Why I do this, the read and change groups are ok on the first level, but the
> > go down every level on the files.
> > We also tried using the "/SPEC D" switch, but the permissions continue to
> > inherit every level, most of the time only on the files.
> >
> > Each folder needs to have their two groups (read and change), but nothing
> > should inherit down to subfolders, except for the security ACE's put on top,
> > on the share itself.
> >
> >
> > I'm tired (and french), so I hope I'm clear enough. Please help.
> >
> > Thanks a lot.
> >
> > --
> > Franck
> > http://supermarches.faire-le-bon-choix.fr

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need permission to delete file when logged in as sysadmin? Speed Dial Windows Vista Help 2 05-16-2010 03:18 PM
Server 2003 update problem kc66 Windows Update 7 12-22-2009 04:09 PM
Re: Windows cannot access the specified device,path or file. You may not have the appropiate permission to access the item Dave-UK Windows Vista General Discussion 0 11-16-2009 12:53 PM
Difficulty with EFS & importing PFX file Aaron Solomon Windows Vista File Management 0 08-24-2007 09:08 PM
mmc.exe error, cannot run. olouvignes Windows Vista Installation 4 04-18-2007 02:40 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59