Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

advice, writing to remote share

by djbryson (Beadle)
on Jan 15, 2007 at 16:29 UTC ( [id://594768]=perlquestion: print w/replies, xml ) Need Help??

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?

Replies are listed 'Best First'.
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).

    -Paul

      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.

      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.
        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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://594768]
Approved by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2025-02-18 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found