djbryson has asked for the wisdom of the Perl Monks concerning the following question:
Hey monks,
I need some advice. I need to write to a remote share on a windows domain. My perl script is in a webpage running on an IIS server. I need to write to another server on the same domain. To test, I created a share on my computer and tried to write to it from the script. One PC to another right, same idea. I tired to map a network drive but I get a permission error. I gave the "everyone" and "domain users" network group full control, but maybe the script needs IWAN and IUSER permissions? Those are the IIS network groups. Although those groups only pertain to the PC that IIS is running on. What permission does the perl script need? I've tried using virtual shares in IIS too but I couldn't get that to work either. Someone suggested having the perl script on the remote share so when it writes its actually locally. I don't think i want to do that. Anyway, i'd just like some advice. What's the best way to do this?
Re: advice, writing to remote share
by jettero (Monsignor) on Jan 15, 2007 at 16:36 UTC
|
Is this the same problem tye was talking about (Re: error mapping drive ('\\'))? It looked like it got resolved. What is going wrong now?
It probably isn't the permissions of the perl script that are the issue. I'm no windows expert (or even user if I can help it), but most likely IIS intentionally runs with limited permissions to prevent the kinds of things you're trying to do (i.e. exposing your network shares to the entire world).
| [reply] |
|
Is this the same problem tye was talking about
There were two issues raised in that earlier thread. I noticed the permission problem. tye noticed the bad path. At the time, the OP was doing offline testing, so he fixed that bad path and ignored the permission problem. Until now.
It probably isn't the permissions of the perl script that are the issue.
Correct. Services usually run as LocalSystem which doesn't have network permissions. The service and/or the script needs to run as a user with network permissions. I don't know which user that would be, or how to grant such permissions.
| [reply] [d/l] |
|
Yes i resolved the drive mapping problem, but I was doing that locally. I was running the perl script from the command line and mapping the a drive on my PC. So, of course no permissions issues. If I try to map a drive remotely it fails because of permissions.
| [reply] |
|
I figured it out.
By default the form runs as the IIS IWAM local account(which of course can't have permissions remotely). If you change this to a network account in IIS and then give the remote folder the same network account permissions, BAM... you can write remotely. Thanks for helping me brainstorm boys
| [reply] |
|
|