From: Narendra B on 29 May 2010 03:53 TCL language: how to access ACLs? How to access Access control list of a file via TCL? e.g. if a particular file has permission for two users, I want to access these two users names. So, need to ACLs. If this is not possible via TCL, which command I can use on windows to get the ACLs? (e.g. on Linux one can use getacl command) Thanks, Narendra
From: Alexandre Ferrieux on 29 May 2010 06:38 On May 29, 9:53 am, Narendra B <bhagw...(a)gmail.com> wrote: > TCL language: how to access ACLs? > > How to access Access control list of a file via TCL? e.g. if a > particular file has permission for two users, I want to access these > two users names. So, need to ACLs. > > If this is not possible via TCL, which command I can use on windows to > get the ACLs? (e.g. on Linux one can use getacl command) > > Thanks, > Narendra Maybe look at the TWAPI extension. Dunno whether it exposes the exact API you are after, but if anybody does, it will ;-) Alternatively, you can use [exec] to spawn an instance of a command- line ACL tool like cacls: http://en.wikipedia.org/wiki/Cacls -Alex
From: APN on 30 May 2010 07:29 On May 29, 12:53 pm, Narendra B <bhagw...(a)gmail.com> wrote: > TCL language: how to access ACLs? > > How to access Access control list of a file via TCL? e.g. if a > particular file has permission for two users, I want to access these > two users names. So, need to ACLs. > > If this is not possible via TCL, which command I can use on windows to > get the ACLs? (e.g. on Linux one can use getacl command) > > Thanks, > Narendra Example to get this for C:\windows package require twapi set sd [twapi::get_resource_security_descriptor file "c:/windows"] ;# Security descriptor twapi::get_security_descriptor_text $sd -resourcetype file; # Print security descriptor twapi::get_security_descriptor_dacl $sd; # Get the DACL in the security descriptor See the twapi documentation for more /Ashok
|
Pages: 1 Prev: How to avoid nesting? An idea... Next: invalid command interact |