Archive: Problems with Networkshares ...


Problems with Networkshares ...
Hi Community.

I need to add some shares to my installer. To add a share I us e "net share Sharename=Drive:Path" and It work. But I need also to add the User Everyone to have full access. On Win2k3 it is possible to add an "/GRANT:user,rights" to the command. This command isn't available on Win2k or WinXP.
Is there a Plugin or Command which I can use to add/remove/change Users to shares (access rights)?

Thank you very much for every feedback.


AccessControl can grant and revoke user privileges. It should allow you to set rights for the root directory of the share.


Originally posted by kichik
AccessControl can grant and revoke user privileges. It should allow you to set rights for the root directory of the share.
Great! Thank you very much!

Hmmm ... another problem.
Hi.

There is another problem. When I use the Plugin it works ... but when I change the access rights for \\PCNAME\Path the same rights are also set for the local path (e.g. c:\xyz\share\path). In the dir are ini which should be writable for the application (local) but not for the networkshare (remote pc).

Any ideas?


If it's the same file, I don't see the problem. A file can't have two different sets of access privileges. Either a user can or can't access it. It shouldn't matter if a user tries to connect from a remote computer or from the local computer.


Originally posted by kichik
If it's the same file, I don't see the problem. A file can't have two different sets of access privileges. Either a user can or can't access it. It shouldn't matter if a user tries to connect from a remote computer or from the local computer.
Thats right. I know, my english isn't sometimes the best. To make myself clear let me show you two screenshots ... ;-)

http://img153.imageshack.us/img153/6605/pic1de7.jpg
I want to change the "Share Permissons" for the User Everyone.

But with the Plugin I am only able to change the "Security Permissions" ... see here:
http://img86.imageshack.us/img86/6982/pic2kk9.jpg

How to change the "Share Permissions" for the User everyone?

Thanks for your support,
Denis

Ah, I see now what you mean. AccessControl can't do that. You can set share permissions using the NetShareSetInfo API with the 1501 data level. You can use the System plug-in to call that or write a little plug-in of your own.

You can also use SetACL to set the share permissions.


Originally posted by kichik
[...]You can also use SetACL to set the share permissions.
My report: Works fine here! :) Very cool tool.