Re: Error in reading remote server file with HTTP
[email protected] Tue, 10 Aug 2010 11:56:31 -0500
| Newsgroups | gmane.comp.python.mod_python |
|---|---|
| Message-ID | <[email protected]> |
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" <[email protected]> > 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 =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 a= m >> getting Error while using opening the file. >> >> So I tried to use os.access (path, F_OK) to check for path availabilit= y >> 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. >> >> Thanks In advance >> Rahul Warhekar >> >> >> _______________________________________________ >> Mod_python mailing list >> [email protected] >> http://mailman.modpython.org/mailman/listinfo/mod_python > > ++++++++++++++++++++++++++++++++++++++++++++++++ > The information contained in this communication is strictly confidentia= l > and intended solely for the use of the intended recipient(s). The > copyright in this communication belongs to ITG Australia Ltd, ITG Hong > Kong Limited, ITG Singapore Pte Ltd and/or their related entities, > including Investment Technology Group, Inc., (collectively referred to = as > =E2=80=9CITG") and may contain information that is private, confidentia= l or > subject to legal professional or other privilege. No confidentiality or > privilege is waived or lost by any mis-transmission of this email. > > Access to this email by anyone other than the intended recipient is > unauthorized and further distribution of this email is strictly prohibi= ted > without the permission of ITG. If you are not the intended recipient of > this email, any review, disclosure, copying, distribution, retention or > any action taken or omitted to be taken in reliance on it is prohibited > and may be unlawful. If you are not the intended recipient of this emai= l, > you should not disseminate, distribute or copy this e-mail and you shou= ld > delete it and all copies of it from your system, destroy any hard copie= s > of it and notify the sender. ITG and/or its affiliates reserve the righ= t > to monitor and archive all electronic communications through its/their > network. > > The information contained in this email is believed to be accurate at t= he > time of publication. However, ITG disclaims all responsibility for any > loss or damage howsoever arising as a result of any person or entity > acting upon the information contained in this email and no liability wi= ll > be accepted by ITG for any such loss or damage. Any views expressed in > this email are those of the individual sender, except where the email > states otherwise and the sender is authorized to state them to be the > views of ITG. > ++++++++++++++++++++++++++++++++++++++++++++++++ >