Re: Error in reading remote server file with HTTP

Peter Bittner <[email protected]> Tue, 17 Aug 2010 15:48:18 +0200
Newsgroups gmane.comp.python.mod_python
Message-ID <[email protected]>
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 <[email protected]>:
> Hello All,
>
> Please guide me with the issue. I have tried all the ways to overcome t=
he problem but was not able to solve it.
> Now I am thinking to give all the permissions required to read the file=
s from remote server to browser but not getting
> Exact permission required.
>
>
> Thanks & Regards,
> Rahul
>
> -----Original Message-----
> From: [email protected] [mailto:mod_python-bounces@modpy=
thon.org] On Behalf Of [email protected]
> Sent: Tuesday, August 10, 2010 10:27 PM
> To: Bond, Gregory
> Cc: [email protected]
> 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() i=
s
>> possibly not what you want, as it is designed to do different things i=
n
>> suid
>> environment.
>>
>>
>> On 5/08/10 10:49 PM, "Rahul Warhekar" <[email protected]>
>> wrote:
>>
>>> Hello,
>>>
>>> Ok, I will change my question.
>>> I want to open remote servers text file using mod_python in my progra=
m,
>>> to
>>> display file contents in browser for reading.
>>> But I am getting result as =8CFALSE=B9 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 =8CTRUE=B9.
>>>
>>> Please guide me with the problem. I am being stuck on this place.
>>>
>>> Thanks,
>>> Rahul Warhekar
>>>
>>>
>>>
>>>
>>>
>>> From: [email protected]
>>> [mailto:[email protected]] On Behalf Of Rahul Warhekar
>>> Sent: Wednesday, August 02, 2010 9:16 PM
>>> To: [email protected]
>>> 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 availabili=
ty
>>> from
>>> Python IDE so it returns =8CTrue=B9 but when I
>>>
>>> Tries the same os.access(path, F_OK) function from browser it is
>>> returning
>>> =8CFalse=B9.
>>>
>>> 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.
>>>
>>> =A0Thanks In advance
>>> Rahul Warhekar