Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glob() fails for network drive in cgi #36769

Closed
bshoe282 mannequin opened this issue Jun 19, 2002 · 4 comments
Closed

glob() fails for network drive in cgi #36769

bshoe282 mannequin opened this issue Jun 19, 2002 · 4 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@bshoe282
Copy link
Mannequin

bshoe282 mannequin commented Jun 19, 2002

BPO 571167
Nosy @mhammond
Files
  • Script1.cgi: example of glob inconsistency
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/mhammond'
    closed_at = <Date 2002-07-10.06:07:33.000>
    created_at = <Date 2002-06-19.15:29:40.000>
    labels = ['invalid', 'library']
    title = 'glob() fails for network drive in cgi'
    updated_at = <Date 2002-07-10.06:07:33.000>
    user = 'https://bugs.python.org/bshoe282'

    bugs.python.org fields:

    activity = <Date 2002-07-10.06:07:33.000>
    actor = 'mhammond'
    assignee = 'mhammond'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2002-06-19.15:29:40.000>
    creator = 'bshoe282'
    dependencies = []
    files = ['525']
    hgrepos = []
    issue_num = 571167
    keywords = []
    message_count = 4.0
    messages = ['11257', '11258', '11259', '11260']
    nosy_count = 2.0
    nosy_names = ['mhammond', 'bshoe282']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue571167'
    versions = []

    @bshoe282
    Copy link
    Mannequin Author

    bshoe282 mannequin commented Jun 19, 2002

    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.

    @bshoe282 bshoe282 mannequin closed this as completed Jun 19, 2002
    @bshoe282 bshoe282 mannequin added the invalid label Jun 19, 2002
    @bshoe282 bshoe282 mannequin assigned mhammond Jun 19, 2002
    @bshoe282 bshoe282 mannequin added the stdlib Python modules in the Lib dir label Jun 19, 2002
    @bshoe282 bshoe282 mannequin closed this as completed Jun 19, 2002
    @bshoe282 bshoe282 mannequin added the invalid label Jun 19, 2002
    @bshoe282 bshoe282 mannequin assigned mhammond Jun 19, 2002
    @bshoe282 bshoe282 mannequin added the stdlib Python modules in the Lib dir label Jun 19, 2002
    @mhammond
    Copy link
    Contributor

    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.

    @bshoe282
    Copy link
    Mannequin Author

    bshoe282 mannequin commented Jun 28, 2002

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

    @mhammond
    Copy link
    Contributor

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant