Chris Devers wrote:
Sorry, all I know of is cacls and maybe xcacls (Windows Resource Kit?) and some others.On Mon, 27 Sep 2004, S.A. Birl wrote:
I could use backticks `` to call cacls.exe inside of Perl But there's a problem using cacls.exe, I cannot wipe out all permissions on a given directory. I need to know the user/group.
Is there another .exe? If so, email off-line as this goes outside of
Perl and I dont want to fill up the PERL list with non-Perl stuff.
Actually, it would be interesting to keep this on list, as long as it doesn't go *too* far astray. This is a problem that a lot of Windows users may want to address sooner or later, and if Perl can't do it then there might as well be a note in the archives saying what did work.
I always thought it was weird that the chmod() / chown() etc functions didn't get rigged to Do The Right Thing on Windows. Really, you shouldn't have to learn a new permissions API when Perl already has a perfectly good one that works for *nix (Linux, Solaris, OSX, etc) and seems like it would correlate tolerably well onto Windows systems.
Heck, if Cygwin can weld it on there, why not Perl? :-)
I don't think I understand your problem though - cacls can replace or augment permissions and I don't think you need to know current user/group. You don't want a file with no ACLs - can't you default to Administrator:F in this condition? If you can clarify exactly what permissions you want to apply, I might be able to give a syntax example.
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>