[Python-bugs-list] [ python-Bugs-571167 ] glob() fails for network drive in cgi

noreply@sourceforge.net noreply@sourceforge.net
Tue, 09 Jul 2002 23:07:33 -0700


Bugs item #571167, was opened at 2002-06-20 01:29
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=571167&group_id=5470

Category: Python Library
Group: Python 2.1.1
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Brian Schuweiler (bshoe282)
Assigned to: Mark Hammond (mhammond)
Summary: glob() fails for network drive in cgi

Initial Comment:
glob.glob() does not work when globbing a network 
mapped drive while running as a cgi script.  The method 
works fine when run as a normal python script (even for 
mapped drives), but does not work when run from a 
browser as a cgi script.  The glob returns an empty list 
as if the drive just isn't there.

----------------------------------------------------------------------

>Comment By: Mark Hammond (mhammond)
Date: 2002-07-10 16:07

Message:
Logged In: YES 
user_id=14198

In your specific example, you use "z:" commenting it is a
mapped drive.  However, it is probably not mapped for the
system user, hence we see "file not found" rather than
"access denied.".  Drive mappings are stored per user, not
per machine.

You could try using r"\server\sharename" syntax, but I am
fairly certain any problems you face then will be permission
problems.  If you search comp.lang.python on google, you
will find this has indeed come up a few times and has always
been permissions.

Closing, but happy to reopen if you can demonstrate there is
some other problem.

----------------------------------------------------------------------

Comment By: Brian Schuweiler (bshoe282)
Date: 2002-06-29 04:28

Message:
Logged In: YES 
user_id=565626

Thanks for the response.  My initial thoughts were that it is a 
permissions problem.  What made me believe otherwise and 
log a bug was that no errors are thrown in the webserver and 
the glob does return something, but it is an empty set.  It 
seems as though the glob works, but there are no matches 
(even though there definitely are).  

----------------------------------------------------------------------

Comment By: Mark Hammond (mhammond)
Date: 2002-06-28 11:19

Message:
Logged In: YES 
user_id=14198

Assuming Windows.

This is almost certainly a permissions problem.  The IIS
server does not run CGI as a "regular" user, but as the
"system user".  The system user has no permissions to access
network resources, hence your problem.

Thus, this is not a Python problem.  You need to check the
IIS docs to see how, or even if, you can loosen the
permissions (and assuming you understand the implications of
doing so).

Unless i hear back in a few days that there is another
problem I will close this as invalid.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=571167&group_id=5470