View Single Post

  #3 (permalink)  
Old 07-25-2006
John Howard
 
Posts: n/a
Default Re: Accessing network resources within Apache module?

Kees Nuyt, thank you for your reply.

This problem is driving me crazy, and I appreciate your ideas to help.

I do not understand why I can write an EXE that can reach across the network
(another machine in the same domain) and create directories and files, but
exactly the same code in an Apache .so module cannot access the other
machine. I think you are right when you say this is a privileges issue.
But where?

Yes, I did try full UNC paths. Does not work. I can use UNC paths and/or
mapped drive letters to successfully create files and directories across the
network if I run this code as a standalone EXE, running under my admin user
account, but neither UNC paths nor drive letters work in the exact same code
in a Apache .so module.

I don't know if this problem is a limitation of all Windows services, or if
this is only a limitation of Apache, or is it a Windows / user / privileges
settings issue.

This is why I am asking if anybody knows if Windows services are not
permitted to create directories or files on another machine, or is this a
known issue with Apache?

I am very eager to try any other ideas you (or anyone) may have.

Thanks again for offering your ideas!

- John Howard

P.S. -- Again this has nothing to do with the Apache settings, which are
concerned with files served via Apache to http requests. Instead, this
problem is strictly an issue of an Apache .so module not being able to
create files and/or directories on another server on the same domain, yet a
standalone EXE with the same code has no problem.




"Kees Nuyt" <k.nuyt@nospam.demon.nl> wrote in message
news:r0gac21jjcde1n1etnu83jcdqcqq4504vs@4ax.com...
> On Sun, 16 Jul 2006 18:22:16 GMT, "John Howard"
> <john@johnhoward.com> wrote:
>
> >I wrote an Apache module (.so) which needs to copy files across my local
> >network to another server, and I am finding that this does not work. I
> >don't know if it is a limitation of Apache running as a windows service,

or
> >a limitation of Apache win32 itself, or a limitation of windows services

in
> >general (unable to access resources away from the host server itself).
> >Anybody have experience with this??

>
> Not with copying in this way, but i do have a few aliases that
> point to a share.
>
> >I can write an EXE with the same functionality that has no problem
> >accessing/creating files/directories across the network. So I believe my
> >network/directory sharing rights are okay.
> >
> >This has nothing to do with serving the files to public requests. This

is
> >entirely an issue of accessing files within the Apache .so module itself.
> >
> >I have tried executing Apache as a service from an administrator user
> >account, instead of default system. Still does not work.

>
> An adminstrator user has other settings than your user account
> and local system.
> I think the bindings of driveletters to shares are account
> dependent.
> Did you try full UNC paths ( \\server\share\path\... ) ?
>
> Also, if the share is in another domain even an administrator
> account may not be trusted, while your user account is.
>
> >I am going to try writing a custom DLL which will do what I want if

called
> >from a custom EXE, and then try to call this DLL from my Apache .so, and

see
> >if this works.

>
> That won't make much difference, in my opinion it's all about
> access control of accounts for reading a file on a share.
>
> >I am running Apache 1.3.+ as a service on Win2K.
> >
> >Any other possible ideas to try, or pointers to other

sites/lists/newsgroups
> >with info would be appreciated.

>
> HTH