Tim Roberts | 20 Nov 22:27

Re: Writing to a network share


John Riddle wrote:
> Permissions was a guess of mine as well:
> WindowsError: [Error 5] Access is denied: '\\\\Myshare\\share\\test'
>
> If I run anything from a python shell it works fine. The machine my
> cherrypy app is on runs logged in as the network admin.
> I use mod_python and apache as a service to run cherrypy. It's
> initialized with the "serverless" setup to use those.

That's the key, then.  It doesn't matter who is logged in, or even
whether anyone is logged in.  Apache is a service, and runs as the
"network service" user.  That user doesn't belong to the Users group,
nor to any of your domain groups, so it doesn't have any permission to
access the share.

It's a tricky problem.  If you weren't using mod_python, you could run
the CherryPy service separately and specify a user name for it.  It
might be possible for you to configure the Apache service this way.  In
Control Panel, Administrative Tools, run Services.  If Apache is listed,
you should be able to double-click on it and change the "Log On As"
value.  If you do, make sure that's what you want -- it means all of
your web requests will run as that user.

--

-- 
Tim Roberts, timr@...
Providenza & Boekelheide, Inc.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
(Continue reading)

John Riddle | 21 Nov 01:17

Re: Writing to a network share

Logging in as the admin for the service did the trick. Thanks again Tim you've been a huge help.

On Thu, Nov 20, 2008 at 1:27 PM, Tim Roberts <timr-EQQNi8F+HVEAvxtiuMwx3w@public.gmane.org> wrote:

John Riddle wrote:
> Permissions was a guess of mine as well:
> WindowsError: [Error 5] Access is denied: '\\\\Myshare\\share\\test'
>
> If I run anything from a python shell it works fine. The machine my
> cherrypy app is on runs logged in as the network admin.
> I use mod_python and apache as a service to run cherrypy. It's
> initialized with the "serverless" setup to use those.

That's the key, then.  It doesn't matter who is logged in, or even
whether anyone is logged in.  Apache is a service, and runs as the
"network service" user.  That user doesn't belong to the Users group,
nor to any of your domain groups, so it doesn't have any permission to
access the share.

It's a tricky problem.  If you weren't using mod_python, you could run
the CherryPy service separately and specify a user name for it.  It
might be possible for you to configure the Apache service this way.  In
Control Panel, Administrative Tools, run Services.  If Apache is listed,
you should be able to double-click on it and change the "Log On As"
value.  If you do, make sure that's what you want -- it means all of
your web requests will run as that user.

--
Tim Roberts, timr-EQQNi8F+HVEAvxtiuMwx3w@public.gmane.org
Providenza & Boekelheide, Inc.





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane