LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 10-03-2005, 02:02 AM   #16
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31

Quote:
Originally posted by wilson757
wow, now my pic/tour04 veiws the file and the pic/linux will not
Maybe a ownership/permissions problem. I dont see any files under "linux" but if there are some present, its probably ownership.
 
Old 10-03-2005, 02:07 AM   #17
wilson757
LQ Newbie
 
Registered: Dec 2004
Location: San diego or the sea on LHA-5
Posts: 24

Rep: Reputation: 15
error log after reboot

[Mon Oct 03 03:03:21 2005] [notice] caught SIGTERM, shutting down
[Mon Oct 03 03:03:22 2005] [notice] core dump file size limit raised to 4294967295 bytes
[Mon Oct 03 03:03:23 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Oct 03 03:03:24 2005] [notice] Digest: generating secret for digest authentication ...
[Mon Oct 03 03:03:24 2005] [notice] Digest: done
[Mon Oct 03 03:03:24 2005] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Mon Oct 03 03:03:24 2005] [notice] LDAP: SSL support unavailable
[Mon Oct 03 03:03:25 2005] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
[Mon Oct 03 03:03:25 2005] [notice] Apache/2.0.54 (Fedora) configured -- resuming normal operations
[Mon Oct 03 03:03:30 2005] [error] [client 192.168.1.100] Premature end of script headers: first.pl

last bit of ssl_error

[Mon Oct 03 03:00:11 2005] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Mon Oct 03 03:03:23 2005] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Mon Oct 03 03:03:25 2005] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?

suexec log

[2005-10-03 02:41:35]: uid: (500/bftt) gid: (500/500) cmd: first.pl
[2005-10-03 02:41:35]: file is writable by others: (/var/www/cgi-bin/first.pl)
[2005-10-03 03:03:30]: uid: (500/bftt) gid: (500/500) cmd: first.pl
[2005-10-03 03:03:30]: file is writable by others: (/var/www/cgi-bin/first.pl)
 
Old 10-03-2005, 02:09 AM   #18
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Your problem is the last line of your suexec log. The script first.pl is writable by others. This is a security measure that comes with suexec. It is protecting you from yourself. You should...

chmod 700 first.pl

and see if that allows it to execute.
 
Old 10-03-2005, 02:10 AM   #19
wilson757
LQ Newbie
 
Registered: Dec 2004
Location: San diego or the sea on LHA-5
Posts: 24

Rep: Reputation: 15
changed sirst to 755 and got this on the suexec log

[2005-10-03 03:09:16]: uid: (500/bftt) gid: (500/500) cmd: first.pl
[2005-10-03 03:09:16]: target uid/gid (500/500) mismatch with directory (0/0) or program (500/500)
 
Old 10-03-2005, 02:12 AM   #20
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
make sure the ownerships are correct. try this...

chown -R bftt.bftt /var/www/html

It could be telling you that the cgi-bin is not correct ownership, or maybe the file is not. one or the other.
 
Old 10-03-2005, 02:13 AM   #21
wilson757
LQ Newbie
 
Registered: Dec 2004
Location: San diego or the sea on LHA-5
Posts: 24

Rep: Reputation: 15
[root@digitalunknown cgi-bin]# chmod 700 first.pl
[root@digitalunknown cgi-bin]#

suexec log

[2005-10-03 03:12:47]: uid: (500/bftt) gid: (500/500) cmd: first.pl
[2005-10-03 03:12:47]: target uid/gid (500/500) mismatch with directory (0/0) or program (500/500)
 
Old 10-03-2005, 02:13 AM   #22
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Yeah, that's it...

directory (0/0) or program (500/500)

Means the directory is root/root and the program is bftt/bftt.
 
Old 10-03-2005, 02:15 AM   #23
wilson757
LQ Newbie
 
Registered: Dec 2004
Location: San diego or the sea on LHA-5
Posts: 24

Rep: Reputation: 15
[root@digitalunknown ~]# chown -R bftt.bftt /var/www/html
[root@digitalunknown ~]#

log

[2005-10-03 03:14:17]: uid: (500/bftt) gid: (500/500) cmd: first.pl
[2005-10-03 03:14:17]: target uid/gid (500/500) mismatch with directory (0/0) or program (500/500)
 
Old 10-03-2005, 02:15 AM   #24
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
also, I noticed in your profile it says CV-67 from Jacksonville... I guess you're on the JFK? I know somebody on there... or at least he was last time I checked.... Charles Gray. He's my ex-wife's brother. No idea what he does, but that's where he was stationed.
 
Old 10-03-2005, 02:18 AM   #25
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Hmmm, I'm not sure... it must be trying to tell us that the cgi-bin has wrong ownership. Maybe you can browse around there and see. Is your cgi-bin still under /var/www/html/cgi-bin? Maybe do...

chown bftt.bftt /var/www/html/cgi-bin.

Also, you may want to restart apache instead of rebooting the whole machine.

You can do that by...

apachectl restart
 
Old 10-03-2005, 02:26 AM   #26
wilson757
LQ Newbie
 
Registered: Dec 2004
Location: San diego or the sea on LHA-5
Posts: 24

Rep: Reputation: 15
log

[2005-10-03 03:17:24]: target uid/gid (502/503) mismatch with directory (0/0) or program (502/503)
[2005-10-03 03:18:32]: uid: (502/wilson757) gid: (503/503) cmd: first.pl
[2005-10-03 03:18:33]: uid: (502/wilson757) gid: (503/503) cmd: first.pl
[2005-10-03 03:19:04]: uid: (502/wilson757) gid: (503/503) cmd: first.pl
[2005-10-03 03:21:58]: uid: (502/wilson757) gid: (503/503) cmd: first.pl

changed name to wilson757 wilson757

[root@digitalunknown ~]# chown -R wilson757.wilson757 /var/www/html
[root@digitalunknown ~]#

.....so Gray does not ring a bell. i have only been onboard for a year though. i think there are like 2300 people onboard so.... sorry to hear X. i am getting maried 110505 myself.
 
Old 10-03-2005, 02:38 AM   #27
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
The log tells me that your problem is no longer suexec related. Whatever is wrong now is something to do with your script itself. Suexec seems to be working fine.

Gray might be on another ship now. He was on there about 4 years ago, but I dont know if he's still there now. Anyway, I'm remarried now, so its all good. heh.

Check your other logs and see if they give you any clues. You may also want to add the -w flag to the first line of your script. Like...

#!/usr/bin/perl -w

which may give you some added details in the log files of what could be wrong.

Sorry, I'm off to bed now, but I'll catch back up with you tomorrow.
 
Old 10-03-2005, 03:08 AM   #28
wilson757
LQ Newbie
 
Registered: Dec 2004
Location: San diego or the sea on LHA-5
Posts: 24

Rep: Reputation: 15
night, i #'ed the mod so it is not running. i tryed to run and got

[Mon Oct 03 04:05:01 2005] [notice] Apache/2.0.54 (Fedora) configured -- resuming normal operations
[Mon Oct 03 04:07:55 2005] [error] [client 192.168.1.100] (8)Exec format error: exec of '/var/www/cgi-bin/first.pl' failed
[Mon Oct 03 04:07:55 2005] [error] [client 192.168.1.100] Premature end of script headers: first.pl

thank you for your help so far
 
Old 10-03-2005, 10:34 AM   #29
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Hmmm, I'm afraid it would be hard to say more without seeing the script. One thing I commonly do when I have a situation like this is to remove the guts of the script and do the bare minimum. Like save another version of the script and remove all but a "print" statement. If the script still doesn't work, then you know its a very fundamental problem. It could be a CR/LF problem. Try doing this (command line)...

vi -b first.pl

If you see a bunch of ^M characters at the end of each line, you'll need to delete them and save the file. I hope you're familiar with vi! If not, let me know and I can give you the crash course, but basically you need to open the file in a text editor and change the carriage returns into line feeds.
 
Old 10-05-2005, 01:47 AM   #30
wilson757
LQ Newbie
 
Registered: Dec 2004
Location: San diego or the sea on LHA-5
Posts: 24

Rep: Reputation: 15
ya, i have no clue about vi. i use kedit and kate for writing scripts. the script was one that i pulled from the apache web site. i did run the command you said to and it did this...

#!/usr/bin/perl -w
print "Content-type:text/html\n\n";
print "Hello, World.";
~

next i looked at the man page and tryed the command

[root@digitalunknown cgi-bin]# vim -D first.pl

Entering Debug mode. Type "cont" to continue.
/etc/vimrc
line 1: if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
>

i have no clue what to make of this. than i tryed

[root@digitalunknown cgi-bin]# evim eview

i opened up first.pl and clicked tools>list error. it said "E42 No Error"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need to control a browser from the command line nephish Linux - Software 6 11-21-2005 05:55 PM
command line web browser chingyenccy Linux - Newbie 4 05-06-2005 07:41 AM
PERL script OK at command line, not in browser alvo Programming 4 12-19-2004 08:28 AM
Command line version of Hardware Browser? weshutchins Linux - Hardware 2 09-22-2004 03:24 PM
Command-Line Browser JoshSmith41 Linux - Software 6 01-08-2004 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration