Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Re: Getting share permissions in win32

by idnopheq (Chaplain)
on Mar 19, 2001 at 16:25 UTC ( [id://65469]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Re: Getting share permissions in win32
in thread Getting share permissions in win32

Try a modification of the below with File::Find (I think it will do UNC paths ... anyone?) or DosGlob. You could foreach ( @ARGV ) to parse through specific shares. Win32::NetResource has a discovery capability (not for hidden shares, though).
#!/usr/bin/perl -w use strict; use Win32::Perms; use vars qw ( @List @Mask ); my $Dir = new Win32::Perms( $ARGV[0] ); $Dir->Dump( \@List ); foreach my $shareRef ( @List ) { print "\n" , $shareRef->{'Domain'} , '/' , $shareRef->{'Account'} +, "\n\n"; Win32::Perms::DecodeMask ( $shareRef, \@Mask ); foreach ( @Mask ) { print "\t" , $_ , "\n"; } }
BTW, the URL to Win32::Perms is:
http://www.roth.net/perl/perms/

Dave's main page does seem like a wonderful rendition of a cow in a snowstorm.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://65469]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.