Re: question on security

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 25, 2006 at 09:16:30PM -0800, Chris wrote:
> Hi, Charles,
> 


> 
> This runs fine in command line, it prints the HTML code of Yahoo's
> homepage. But when I run it as a CGI script from browser, it returns
> following message:
> 
> LWP result: {500 Can't connect to www.yahoo.com:80 (Bad hostname 'www.yahoo.com')}
> 
> That's weird that the internet connection is fine (otherwise I
> wouldn't be able to reply this email). So it indicates that when a
> CGI script wants to do this, it will be blocked by some
> mechanism... I am not sure if it has anything to do with SELinux...

Hmm, a very different critter indeed. It sounds like a name resolution
problem. Can you run the script with a suitable IP address? That's not
a perfect long term solution (IP addresses change), but will at least
isolate the problem.

To get an ip address, run

host www.yahoo.com

Long term, if name resolution is indeed the problem, you need to find
out why you can resolve names as your own user but not as
apache:apache.

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB

Attachment: pgpRay9nrhuZ2.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux