|
|
#1 |
|
Prospect
Join Date: Jun 2002
Posts: 11
|
forbidden, no cgi permission
hi...
I have a problem with permissions for cgi-scripts on MacOS X Server. When I want to run it, I only get this message: [Forbidden You don't have permission to access /cgi-bin/printenv] I searched the forum but can't find an answer to this. Things I've done: CGI is active in the Server Admin Preferences all possible permissions for the cgi-file tested what could it be? I've read in the Admin Guide (pdf. doc) that I have to set some permissions for the www-group. How can I do that? Thanx for your help. Btw: the printenv is a cgi-script that comes with the installation of OSX Server. I also tried to rename it to printenv.cgi or printenv.pl, but no change. Last edited by mexx; 08-08-2002 at 08:24 AM. |
|
|
|
|
|
#2 |
|
Prospect
Join Date: Aug 2002
Posts: 11
|
check this link out: http://forums.macosxhints.com/showth...&threadid=4522
You may find some good stuff there. I'm flailing in earnest at this point myself... takayuki |
|
|
|
|
|
#3 |
|
Prospect
Join Date: Jan 2002
Posts: 1
|
Permissions
You may need to check the permissions of the actual cgi-bin/ directory also.
It may be helpful if you post what your permissions and user & group info looks like for these directories. |
|
|
|
|
|
#4 | |||||||||||||||||||
|
MVP
Join Date: Jul 2002
Location: Texas
Posts: 1,075
|
I created my own "cheatsheet" with the instructions on how to use SSI and CGI Scripts locally on my Mac in the event I had to do it all over again when I upgraded to Jaguar. I just edited them to make them a bit more complete (instead of just my shorthand) in hopes it would be helpful to others. Please keep in mind that I may have something wrong in this! I'm just a beginner! But, hopefully, I captured the info I was given accurately enough for this to be helpful.
Since I use both, SSIs and CGI Scripts, I have the instructions mixed together. I'm not going to try to separate them. So this will turn on both. This info comes with many thanks to Erik (eriklager) and Merv (mervTormel) spent a considerable amount of time walking me through these steps.
__________________
Vicki • 15" MacBook Pro 2.66GHz i7, Mavericks 10.9.1, 8GB RAM • iPad 4G WiFi 64GB • iPhone 5 64GB • 15" MacBook Pro 2.4GHz, Tiger 10.4, 4GB RAM • G5 Dual 2GHz, Panther 10.3, 1.5GB RAM • G4 Dual 1GHz, Tiger 10.4, 1.5GB RAM Using Macs since 1986! Last edited by vickishome; 08-08-2002 at 05:38 PM. |
|||||||||||||||||||
|
|
|
|
|
#5 |
|
Prospect
Join Date: Aug 2002
Posts: 11
|
thanks!
Great post!
Reading through your earlier thread (many thanks to Eric and Merv) on setting up the server to run perl and ssi, and your help on finding the httpd.conf file, I just got my perl scripts running in /Library/WebServer/CGI-Executables. As I was configuring the httpd.conf document I was taking notes thinking wouldn't it be nice to have all of this on one cheat sheet. Thanks again, takayuki |
|
|
|
|
|
#6 |
|
Prospect
Join Date: Aug 2002
Posts: 11
|
Mexx,
I'm not sure what directory you are trying to run the scripts from, but I Can run scripts from: /Library/WebServer/CGI-Executables But cannot (forbidden to) run scripts from: Users/myusername/Sites/cgi-bin Which directory are you attempting to run scripts from? Can anyone shed any light on this? I know perl *.cgi scripts will run because they are working in the /Library/WebServer/CGI-Executables, but am forbidden to run scripts in the Users/myusername/Sites/cgi-bin. I set the cgi-bin permissions to 775 (from 755). But nothing. thanks, takayuki |
|
|
|
|
|
#7 |
|
MVP
Join Date: Jul 2002
Location: Texas
Posts: 1,075
|
I missed a change I had made (I'll update the info above later - gotta run for now).
Look in your httpd.conf for this path: "/Library/WebServer/CGI-Executables/" Change it to the path in which your scripts reside. I believe it's in the config file in 2 places (just did a real fast look). Let me know if that works.
__________________
Vicki • 15" MacBook Pro 2.66GHz i7, Mavericks 10.9.1, 8GB RAM • iPad 4G WiFi 64GB • iPhone 5 64GB • 15" MacBook Pro 2.4GHz, Tiger 10.4, 4GB RAM • G5 Dual 2GHz, Panther 10.3, 1.5GB RAM • G4 Dual 1GHz, Tiger 10.4, 1.5GB RAM Using Macs since 1986! |
|
|
|
|
|
#8 |
|
Prospect
Join Date: Aug 2002
Posts: 11
|
I'll try your suggestion.
Can I configure it to run cgi's in more than one directory? ex. /Library/WebServer/CGI-Executables/ and Sites/username/cgi-bin ?? thanks, takayuki |
|
|
|
|
|
#9 |
|
MVP
Join Date: Jul 2002
Location: Texas
Posts: 1,075
|
I changed the instructions I had posted so you might want to double check it now. I obtained a backup of my original httpd.conf file, and used the instructions to make the changes, and then compared that result with the httpd.conf I'm using now. Doing this, I caught a couple of things I needed to change. It should be correct now.
__________________
Vicki • 15" MacBook Pro 2.66GHz i7, Mavericks 10.9.1, 8GB RAM • iPad 4G WiFi 64GB • iPhone 5 64GB • 15" MacBook Pro 2.4GHz, Tiger 10.4, 4GB RAM • G5 Dual 2GHz, Panther 10.3, 1.5GB RAM • G4 Dual 1GHz, Tiger 10.4, 1.5GB RAM Using Macs since 1986! |
|
|
|
|
|
#10 |
|
Prospect
Join Date: Jun 2002
Posts: 11
|
<- this shows exactly how I feel at the moment! Hey guys, thanx a lot, the cgi runs now perfectly. The Guide you've written, Vicki, helped me a lot, because you've listed all important points (also phat thanx to erik and merv).Btw, it took me a long time to learn about setting the permission with chmod +x (point 4. in your guide). Well, I've read something similar in the forum, so I had an idea that I maybe have to change this in the terminal. Terminal? Belive me, it's the first time I used it (and I must say, it's really very powerful...) (for all ultra newbies, like me: point 4.: to set permission: Type "chmod +x /Library/WebServer/CGI-Executables/scriptname.cgi" into the Terminal without the "" . For questions about the chmod, just type man chmod into the Terminal and you get an explanation of chmod. mexx Last edited by mexx; 08-09-2002 at 06:47 AM. |
|
|
|
|
|
#11 |
|
MVP
Join Date: Jul 2002
Location: Texas
Posts: 1,075
|
That's how I felt the other day when it started working for me! I'm glad I was able to pass the help along.
__________________
Vicki • 15" MacBook Pro 2.66GHz i7, Mavericks 10.9.1, 8GB RAM • iPad 4G WiFi 64GB • iPhone 5 64GB • 15" MacBook Pro 2.4GHz, Tiger 10.4, 4GB RAM • G5 Dual 2GHz, Panther 10.3, 1.5GB RAM • G4 Dual 1GHz, Tiger 10.4, 1.5GB RAM Using Macs since 1986! |
|
|
|
|
|
#12 |
|
Triple-A Player
Join Date: Jan 2002
Posts: 67
|
Uh, symlink
Great info!
But I know I'm gonna forget how to use a symlink. My remote host uses cgi-bin, I use cgi-local. How do I write the symlink and in which directory do I put it? Yes, I could look for it on my system now, but I guess I just want that secure feeling one gets from obtaining the right answer from a more experienced user ![]() Thanks! |
|
|
|
|
|
#13 |
|
Triple-A Player
Join Date: Jan 2002
Posts: 67
|
Correction!
Regarding my symlink question above; what I meant to say was:
My remote host uses "#!/usr/local/bin/perl" I use "#!usr/bin/perl". |
|
|
|
|
|
#14 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
Code:
% ln -s /usr/bin/perl /usr/local/bin/perl depending on the file mode of your /usr/local/bin , you may need to sudo to accomplish this. check your work: % ls -l /usr/local/bin/perl lrwxr-xr-x 1 root wheel 13 Aug 17 18:21 /usr/local/bin/perl -> /usr/bin/perl |
|
|
|
|
|
#15 |
|
Triple-A Player
Join Date: Jan 2002
Posts: 67
|
Thank You!
Merv, as usual, you are the best.
|
|
|
|
|
|
#16 |
|
Prospect
Join Date: Jan 2002
Posts: 36
|
unable to cgi
I did everything as prescribed in vicki's list (except that the scripts reside in the default directory /Library/WebServer/CGI-Executables). the script first.pl (the one suggested by the Apache manual) works from the command line, but when trying to point my browser to
http://localhost/cgi-bin/first.pl I get The server encountered an internal error or misconfiguration and was unable to complete your request. tail -1 /var/log/httpd/error.log: [Sun Jan 26 10:29:52 2003] [error] [client 127.0.0.1] Premature end of script headers: /Library/WebServer/CGI-Executables/first.pl httpd.crash.log: Date/Time: 2003-01-26 10:29:52 +0200 OS Version: 10.2.3 (Build 6G30) Host: wind.bgu.ac.il Command: httpd PID: 1369 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000 Thread 0 Crashed: #0 0x00000000 in 0x0 #1 0x00011c08 in cleanup_pool_for_exec #2 0x00011c24 in cleanup_pool_for_exec #3 0x00011c6c in ap_cleanup_for_exec #4 0x000f6120 in cgi_child #5 0x00012468 in spawn_child_core #6 0x000126f4 in ap_bspawn_child #7 0x000f6390 in cgi_handler #8 0x0000d0c8 in ap_invoke_handler #9 0x00016e04 in process_request_internal #10 0x00016e94 in ap_process_request #11 0x00006688 in child_main #12 0x000068fc in make_child #13 0x00006c2c in perform_idle_server_maintenance #14 0x00007190 in standalone_main #15 0x00007828 in main #16 0x000026e0 in _start #17 0x00002560 in start PPC Thread State: srr0: 0x00000000 srr1: 0x4000d030 vrsave: 0x00000000 xer: 0x20000000 lr: 0x00011bcc ctr: 0x00000000 mq: 0x00000000 r0: 0x00000006 r1: 0xbfffb5b0 r2: 0x8fe116f8 r3: 0x00066458 r4: 0x00000000 r5: 0x00000022 r6: 0x00006573 r7: 0xfff69758 r8: 0x00000000 r9: 0x00000002 r10: 0x00003b60 r11: 0x00055ac0 r12: 0x00000000 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000 r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000 r20: 0x00000000 r21: 0x00000000 r22: 0xffffffff r23: 0x000f60c0 r24: 0xbfffd890 r25: 0x00094e20 r26: 0x00000000 r27: 0x000968cb r28: 0x00096d28 r29: 0xbfffd890 r30: 0x0007ce58 r31: 0x00011c54 Any help would be greatlt appreciated. Michael |
|
|
|
|
|
#17 |
|
Prospect
Join Date: Jan 2002
Posts: 36
|
solved - mod_rendezvous
Disabling previously installed mod_rendezvous solved the problem.
|
|
|
|
|
|
#18 |
|
Triple-A Player
Join Date: Jul 2002
Location: Victoria BC, Canada
Posts: 59
|
Thanks Everyone!!
I just have to say thank you to everyone that has been working on this (and I know I'm a year late). I have been trying to get this to work for four days and after readind articles on Webmonkey, O'Rielley (sp?) and everthing else I could find - THIS IS THE BEST PLACE for Mac heads.
Thanks to you all and Happy New Year!! |
|
|
|
![]() |
|
|