Creating a WIN32 folder share

S

Stephen

Hi,

Is there a simple way to share a WIN32 folder.

I have tried using Win32::FileSecurity but the results of a EnumerateRights
on a folder before and after I manually share the folder are exactly the
same.


Thanks
-Steve
 
T

Thomas Kratz

Stephen said:
Hi,

Is there a simple way to share a WIN32 folder.

I have tried using Win32::FileSecurity but the results of a EnumerateRights
on a folder before and after I manually share the folder are exactly the
same.

I think you have to straighten your nomenclature. Sharing of
folders/directories has nothing to do with filesystem rights. You can have
ACLs on the share itself as you can have on other objects, but you
should not mix them up conceptwise.

For sharing a folder try Win32::NetResource or Win32::Lanman
For setting ACLs use Win32::FileSecurity or Win32::perms

Thomas

--
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-
 
S

Stephen

I think you have to straighten your nomenclature. Sharing of
folders/directories has nothing to do with filesystem rights. You can
have
ACLs on the share itself as you can have on other objects, but you
should not mix them up conceptwise.

For sharing a folder try Win32::NetResource or Win32::Lanman
For setting ACLs use Win32::FileSecurity or Win32::perms

Thomas

Thanks... as you spotted I know nothing aobout nomenclature leaset of all
how to pronouce it :)

-Steve
 
S

Stephen

Dunno about a Perl solution, though you could try shelling out to the
net command. For a full command line spec, type 'net share /?' from
the command line.

It's not very elegant, but should get the job done.

HTH..

Thanks, that will come in very hady too. I tried looking for something like
this the other day and came up short !

-Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top