1. What should the permissions be for the cgi-bin folder? chmod 711 cgi-bin <----- drwxr-xr-x 111001001 7 1 1 Octal 711 7=111 1=001 rwx --x 2. What should the permissions be for my web folder and my home directory, and how do I set them. chmod 711 ~ <---- Done ONCE this semester chmod 711 web <---- Done ONCE this semester chmod 711 cgi-bin <---- Done ONCE this semester Note: You would have to do the following BEFORE doing the chmod 711 cgi-bin: cd web chmod 711 cgi-bin You created cgi-bin with the mkdir command, but you did that AFTER you were in the web folder. cd web mkdir cgi-bin 3. What should the permissions be for any of my .cgi perl scripts? chmod 755 *.cgi chmod 755 colors.cgi <--- Must be inside your cgi-bin folder! 4. How can I find out if there are any syntax errors in my PERL script? At the cowboy command prompt, inside of the folder where you have been working on the cgi program, type (if its called colors.cgi) ---------- perl -w colors.cgi perl colors.cgi <------ will give you some of the errors. perl -w colors.cgi <--- will possibly give you additional -warnings. 5. How can I find the line number I am on in the pico editor, to be sure I am at the line where the perl program told me there was an error? Use Control+C inside pico. ^C Cur Pos tells you the Cursor Position. --- --- 6. What permission is needed for ALL of my .gif and .jpg and .htm and .html files? chmod 644 myColorForm.html <--- For example chmod 644 sept28.html The exception here would be a guestBook.html file, that you wanted to have users be able to add their new FORM submitted information to. If your PERL CGI script to write their answers and SUBMITted data to that guestBook.html, it needs to be: chmod 766 guestBook.html -rwxrw-rw- 7 6 6 chmod 777 guestBook.html would be OK too. 7. What is the URL that I would use to get to the file named myFirstForm.html? http://student.cns.uni.edu/~yourUNI_UserID/myFirstForm.html Notice that you NEVER mention the web folder in the URL. Know also that the cns stands for college of natural sciences - - - 8. What should be the 1st 3 lines of my PERL scripts? #!/usr/bin/perl -------------------- require "subparseform.lib"; <----- OUT OF DATE use CGI ':standard'; &Parse_Form; -------------------- use CGI ':standard'; -------------------- 9. What should be the permissions for the subparseform.lib file? chmod 755 subparseform.lib <--- OUT OF DATE use CGI ':standard'; to replace this subparseform.lib 10. Where should the subparseform.lib file be located? The subparseform.lib library file should be stored in <-- OUT OF DATE your cgi-bin folder. (NOT NEEDED now with CGI.pm built into PERL). 11. What would happen if the first command you typed after logging into cowboy.cns.uni.edu were chmod 755 subparseform.lib? -------------------------- ERROR MESSAGE (actual) cowboy:~$ chmod 755 subparseform.lib chmod: WARNING: can't access subparseform.lib You forgot to do these two commands: cd web <---- Go to dining room (off living room) cd cgi-bin <---- Go to kitchen (its off dining room) You are in the living room trying to open the oven or refrigerator door. You gotta go to the kitchen first, if you want to cook supper! 12. What does cd mean? What does cd .. mean? -- ----- cd means change directory cd .. <-- means change to parent - - directory, closing current directory (folder). 13. What if you logged in to work on cowboy.cns.uni.edu, and were continuing work on yourFirstForm.html web page, and discovered it was empty? pico yourFirstForm.html <---- You discover its a brand new file!! :-( The cause of this slimer is simple. You are NOT in the right folder (directory). You need to AT LEAST type cd web, if it was stored in the web folder. If it was stored in your cgi-bin folder, inside your web folder, you need to do: cd web cd cgi-bin <--- To move down to right room-full of files. To see the names of all the files in the current folder, type: ls list files - - To see the names of all of the .html files only, type: ls *.html ( or ls *.htm* ) --------- --------- 14. How can I see what the permissions are for my files and folders? ls -l (list files long listing) LS minusL ls -l - - - ----- 15. 1111 = 15 = F = 17 Binary, Decimal, Hexadecimal, Octal 2 10 16 8 16. 10000 = 16 = 10 = 20 2 10 16 8 Base 2, Base 10, Base 16, Base 8 review 17. What error does the following PERL program contain? #!/usr/bin/perl print "Content-type:text/html\n\n"; print "