Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: advice, writing to remote share

by jettero (Monsignor)
on Jan 15, 2007 at 16:36 UTC ( [id://594769]=note: print w/replies, xml ) Need Help??


in reply to advice, writing to remote share

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

Replies are listed 'Best First'.
Re^2: advice, writing to remote share
by ikegami (Patriarch) on Jan 15, 2007 at 18:34 UTC

    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.

Re^2: advice, writing to remote share
by djbryson (Beadle) on Jan 15, 2007 at 19:44 UTC
    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
        For what it's worth, I've found that mapping drives is often not required as many Perl functions such as "glob", "open", "copy", "unlink" and "tempfile" (for example) work fine using Windows UNCs (\\server\share\file). Kind of nice to skip the drive letter mapping altogether.

        Note: it's sometimes necessary (if not preferred) to swap back-slashes with slashes in UNCs. (//server/share/file).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2025-03-21 07:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (63 votes). Check out past polls.