Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'root': 0.04; 'subject:Python': 0.05; 'line:': 0.07; 'python': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'apache': 0.13; 'file,': 0.15; '"python': 0.16; 'normally.': 0.16; 'skip:/ 50': 0.16; 'wrote:': 0.17; 'figures': 0.17; 'requests': 0.18; 'file.': 0.20; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'script': 0.24; 'cc:addr:python.org': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'embedded': 0.27; 'actual': 0.28; 'all.': 0.28; 'skip:/ 40': 0.29; 'writes:': 0.29; 'van': 0.29; 'located': 0.31; 'file': 0.32; 'received:google.com': 0.34; 'server': 0.35; 'open': 0.35; 'too.': 0.35; 'received:209.85': 0.35; 'too': 0.36; 'itself': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'where': 0.40; 'remove': 0.61; 'is.': 0.62; '8bit%:100': 0.70; '8bit%:92': 0.70; '2013': 0.84; 'addon': 0.84; 'skip:/ 30': 0.91; 'angel': 0.93 X-Received: by 10.49.81.72 with SMTP id y8mr3869206qex.42.1358780132128; Mon, 21 Jan 2013 06:55:32 -0800 (PST) Newsgroups: comp.lang.python Date: Mon, 21 Jan 2013 06:55:32 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.70.179; posting-account=DYJQ-woAAACEPH85Au2BhUVfFTfSfVa4 References: <339d9d6d-b000-4cf3-8534-375e0c44b2ca@googlegroups.com> <10ebf68d-12f9-46d6-be50-6c314500302d@googlegroups.com> <2bf766db-ffcd-4a7f-8e08-6e3400618e78@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 94.68.70.179 MIME-Version: 1.0 Subject: Re: Forcing Python to detect DocumentRoot From: Ferrous Cranus To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 78 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1358780141 news.xs4all.nl 6973 [2001:888:2000:d::a6]:59143 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37198 =CE=A4=CE=B7 =CE=94=CE=B5=CF=85=CF=84=CE=AD=CF=81=CE=B1, 21 =CE=99=CE=B1=CE= =BD=CE=BF=CF=85=CE=B1=CF=81=CE=AF=CE=BF=CF=85 2013 2:33:22 =CE=BC.=CE=BC. U= TC+2, =CE=BF =CF=87=CF=81=CE=AE=CF=83=CF=84=CE=B7=CF=82 Dave Angel =CE=AD= =CE=B3=CF=81=CE=B1=CF=88=CE=B5: > On 01/21/2013 01:25 AM, Ferrous Cranus wrote: >=20 > > =CE=A4=CE=B7 =CE=A3=CE=AC=CE=B2=CE=B2=CE=B1=CF=84=CE=BF, 19 =CE=99=CE= =B1=CE=BD=CE=BF=CF=85=CE=B1=CF=81=CE=AF=CE=BF=CF=85 2013 10:01:15 =CE=BC.= =CE=BC. UTC+2, =CE=BF =CF=87=CF=81=CE=AE=CF=83=CF=84=CE=B7=CF=82 Piet van O= ostrum =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: >=20 > >> Ferrous Cranus writes: >=20 >=20 >=20 > > While >=20 > > >=20 > > /home/nikos/public_html/cafebar-idea.gr/cgi-bin/counter.py >=20 > > >=20 > > that has also embedded this line: >=20 > > >=20 > > >=20 > > >=20 > > cannnot open the file normally. >=20 > > >=20 > > And the questions iw WHY since python script can open ANY filesystempat= h >=20 > > file the user has access too. >=20 > > >=20 >=20 >=20 > As Piet has said,Python is NOT opening the file mail.png. When the html= =20 >=20 > is sent to the browser, and the browser requests that image file, it's=20 >=20 > the server itself who figures out where the actual file is. Python=20 >=20 > isn't involved at all. >=20 >=20 >=20 > --=20 >=20 > DaveA Yes Dave so we need to remove since th= e apache cant see to open it and let Python open it which we know it can be= cause it has access to any system file the user has access too. httpd cannot open this file because the location of the image is past the a= ddon domain's Document Root. /home/nikos/public_html/cafebar-idea.gr =3D Addon's Domain Document Root /home/nikos/public_html/data/images/mail.png =3D where the image file is lo= cated and the python scipt is on: /home/nikos/public_html/cafebar-idea.gr/cgi-bin/counter.py So if a python script can open any file the user has access too then we nee= d a "python way" of opening this file.