[mod_python] Error in reading remote server file with HTTP

Peter Bittner peter.bittner at gmx.net
Tue Aug 17 09:48:18 EDT 2010


Rahul,

I believe you need to provide us with more details about the problem,
ideally example source code (relevant snippets) from your application
and directory listings (showing file modes) from the webserver you are
trying to access.

It is very difficult to help you when we have to guess the details.

Peter


2010/8/17 Rahul Warhekar <rahul.warhekar at edisphere.com>:
> Hello All,
>
> Please guide me with the issue. I have tried all the ways to overcome the problem but was not able to solve it.
> Now I am thinking to give all the permissions required to read the files from remote server to browser but not getting
> Exact permission required.
>
>
> Thanks & Regards,
> Rahul
>
> -----Original Message-----
> From: mod_python-bounces at modpython.org [mailto:mod_python-bounces at modpython.org] On Behalf Of rahul.warhekar at edisphere.com
> Sent: Tuesday, August 10, 2010 10:27 PM
> To: Bond, Gregory
> Cc: mod_python at modpython.org
> Subject: Re: [mod_python] Error in reading remote server file with HTTP
>
> Thanks Bond,
>
> But can you help me elaborating what kind of permission is required to
> access the file using Webserver.
> So that i can make necessary changes.
>
> Thanks
> Rahul
>> Suspect this is not a mod_python issue so much as a permissions issue.
>> When
>> running from webserver, you will use different username and hence have
>> different permissions than when running from command line or IDE.
>>
>> And given that web servers are sometimes SUID processes, os.access() is
>> possibly not what you want, as it is designed to do different things in
>> suid
>> environment.
>>
>>
>> On 5/08/10 10:49 PM, "Rahul Warhekar" <rahul.warhekar at edisphere.com>
>> wrote:
>>
>>> Hello,
>>>
>>> Ok, I will change my question.
>>> I want to open remote servers text file using mod_python in my program,
>>> to
>>> display file contents in browser for reading.
>>> But I am getting result as ŒFALSE¹ when I tried to check the
>>> availability of
>>> that path in my program. For checking path I have used
>>> Os.access(path, os.F_OK) function.
>>>
>>> But for information when I used the same function with same path from
>>> Python
>>> IDE I am getting output as ŒTRUE¹.
>>>
>>> Please guide me with the problem. I am being stuck on this place.
>>>
>>> Thanks,
>>> Rahul Warhekar
>>>
>>>
>>>
>>>
>>>
>>> From: mod_python-bounces at modpython.org
>>> [mailto:mod_python-bounces at modpython.org] On Behalf Of Rahul Warhekar
>>> Sent: Wednesday, August 02, 2010 9:16 PM
>>> To: mod_python at modpython.org
>>> Subject: [mod_python] Error in reading remote server file with HTTP
>>>
>>> Hello All,
>>>
>>> I am trying to read file from remote machine using mod_python, but I am
>>> getting Error while using opening the file.
>>>
>>> So I tried to use os.access (path, F_OK) to check for path availability
>>> from
>>> Python IDE so it returns ŒTrue¹ but when I
>>>
>>> Tries the same os.access(path, F_OK) function from browser it is
>>> returning
>>> ŒFalse¹.
>>>
>>> I think this function might be due to some security reasons but my
>>> os.access()
>>> is returning true when executed from
>>>
>>> Python IDE.
>>>
>>> Any help regarding this will be greatly appreciated.
>>>
>>>  Thanks In advance
>>> Rahul Warhekar



More information about the Mod_python mailing list