Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > managing NTFS permissions - cacls or wmi?

Reply
Thread Tools Display Modes

managing NTFS permissions - cacls or wmi?

 
 
James
Guest
Posts: n/a

 
      11-14-2008
cacls or wmi for managing ntfs permissions?

I was going to go with cacls but having an issue using 'echo y | cacls...'
command? my cacls command is good, it works until I try to echo y into it so
it can go without user interaction. Anyone know whats up with that?

how is wmi for this? haven't looked yet, just looking for others opinions
based on their experiences using either of these

thanks


 
Reply With Quote
 
 
 
 
James
Guest
Posts: n/a

 
      11-14-2008
I was putting a space after y in: echo y | cacls...

echo y| cacls... without the space works, of course

regardless, still interested in hearing about others experience using this
and/or wmi for scripting ntfs permission managment tasks. I have not looked
into the wmi route but do recall an example somewhere that looked overly
complicated for the goal at hand... I'm thinking cacls is much simpler, with
the only negative being I need to shell out from wsh.

thanks

"James" <> wrote in message
news:Or$...
> cacls or wmi for managing ntfs permissions?
>
> I was going to go with cacls but having an issue using 'echo y | cacls...'
> command? my cacls command is good, it works until I try to echo y into it
> so it can go without user interaction. Anyone know whats up with that?
>
> how is wmi for this? haven't looked yet, just looking for others opinions
> based on their experiences using either of these
>
> thanks
>



 
Reply With Quote
 
Marcin
Guest
Posts: n/a

 
      11-16-2008
James - stick to cacls (try xcacls or icacls if you are running Vista).
While managing permissions via scripting (with or without WMI) is certainly
possible, such approach is considerably more complex and time consuming.
Check http://technet.microsoft.com/en-us/m.../cc160995.aspx to get a
taste of it...

hth
Marcin

"James" <> wrote in message
news:%...
>I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course
>
> regardless, still interested in hearing about others experience using this
> and/or wmi for scripting ntfs permission managment tasks. I have not
> looked into the wmi route but do recall an example somewhere that looked
> overly complicated for the goal at hand... I'm thinking cacls is much
> simpler, with the only negative being I need to shell out from wsh.
>
> thanks
>
> "James" <> wrote in message
> news:Or$...
>> cacls or wmi for managing ntfs permissions?
>>
>> I was going to go with cacls but having an issue using 'echo y |
>> cacls...' command? my cacls command is good, it works until I try to echo
>> y into it so it can go without user interaction. Anyone know whats up
>> with that?
>>
>> how is wmi for this? haven't looked yet, just looking for others opinions
>> based on their experiences using either of these
>>
>> thanks
>>

>
>



 
Reply With Quote
 
James Whitlow
Guest
Posts: n/a

 
      11-16-2008
"James" <> wrote in message
news:%...
>I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course
>
> regardless, still interested in hearing about others experience using this
> and/or wmi for scripting ntfs permission managment tasks. I have not
> looked into the wmi route but do recall an example somewhere that looked
> overly complicated for the goal at hand... I'm thinking cacls is much
> simpler, with the only negative being I need to shell out from wsh.


I frequently use cacls from both command line and script. I use it
exclusively with the /E switch, which does not present a confirmation
prompt. In my case, I am just wanting to grant (or revoke) a specific user
from the directory or file. I am not concerned with altering other
permissions on the directory.

I also looked at the WMI method sometime back & came to the same
conclusion as you. It is indeed a lot of learning and work to accomplish
what shelling out to cacls could accomplish easily.


 
Reply With Quote
 
David Trimboli
Guest
Posts: n/a

 
      11-17-2008
James wrote:
> I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course


Just so you know: cacls also takes a /f (“force”) parameter to skip
confirmation.

--
David Trimboli
Windows Systems Analyst
Cold Spring Harbor Laboratory
 
Reply With Quote
 
James
Guest
Posts: n/a

 
      11-17-2008
thanks all for the great input. I appreciate it.

"James" <> wrote in message
news:%...
>I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course
>
> regardless, still interested in hearing about others experience using this
> and/or wmi for scripting ntfs permission managment tasks. I have not
> looked into the wmi route but do recall an example somewhere that looked
> overly complicated for the goal at hand... I'm thinking cacls is much
> simpler, with the only negative being I need to shell out from wsh.
>
> thanks
>
> "James" <> wrote in message
> news:Or$...
>> cacls or wmi for managing ntfs permissions?
>>
>> I was going to go with cacls but having an issue using 'echo y |
>> cacls...' command? my cacls command is good, it works until I try to echo
>> y into it so it can go without user interaction. Anyone know whats up
>> with that?
>>
>> how is wmi for this? haven't looked yet, just looking for others opinions
>> based on their experiences using either of these
>>
>> thanks
>>

>
>



 
Reply With Quote
 
David
Guest
Posts: n/a

 
      11-19-2008
we use the following in a bacth file during our initial image building to
set it up.

xcacls.vbs c:\temp /t /e /g BUILTIN\USERS:F /E /I ENABLE
xcacls.vbs c:\temp /t /e /g "domain\DOMAIN USERS":F /E /I ENABLE

"James" <> wrote in message
news:%...
>I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course
>
> regardless, still interested in hearing about others experience using this
> and/or wmi for scripting ntfs permission managment tasks. I have not
> looked into the wmi route but do recall an example somewhere that looked
> overly complicated for the goal at hand... I'm thinking cacls is much
> simpler, with the only negative being I need to shell out from wsh.
>
> thanks
>
> "James" <> wrote in message
> news:Or$...
>> cacls or wmi for managing ntfs permissions?
>>
>> I was going to go with cacls but having an issue using 'echo y |
>> cacls...' command? my cacls command is good, it works until I try to echo
>> y into it so it can go without user interaction. Anyone know whats up
>> with that?
>>
>> how is wmi for this? haven't looked yet, just looking for others opinions
>> based on their experiences using either of these
>>
>> thanks
>>

>
>


 
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
Home Folder server NTFS permissions and share permissions?! UselessUser Windows Server 1 03-10-2008 01:19 PM
Cacls Permissions Problem - Strange Simon G Scripting 1 08-06-2007 09:14 AM
Re: NTFS permissions: users changing permissions by unchecking "inherit permissions from parent" Herb Martin Windows Server 2 05-23-2007 01:58 AM
Re: NTFS permissions: users changing permissions by unchecking "inherit permissions from parent" Anthony Windows Server 0 05-22-2007 10:15 AM
managing permissions Sumner Paine Windows Server 0 10-27-2004 10:17 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