Instructions to Upload from Calvin Hall

Total Page:16

File Type:pdf, Size:1020Kb

Instructions to Upload from Calvin Hall

Instructions to Upload from Calvin Hall

The first step in uploading your web page files to the KSU server requires that you log into UNIX (the name given to the university mainframe and the operating system that runs it).

1. To log into UNIX in the CBA lab, go to the START MENU, locate PuTTY and then select PuTTY again

2. When the PuTTY Configuration screen appears, enter the Host Name as: unix.ksu.edu Then, click Open.

3. YOU MIGHT SEE A MESSAGE BOX POP UP INDICATING THAT THE SERVER’S HOST KEY IS NOT CACHED IN THE REGISTRY. CLICK YES.

4. Login with your eID and password.

5. Once logged in, you will see a unix prompt (pub2% or something similiar)

6. Next, you want to change some of the file permissions for your unix directory so that others can read some of the files placed in your home directory. Type in the following commands at the % prompt EXACTLY AS YOU SEE TYPED, INCLUDING THE SPACE SEPARATING EACH WORD/COMMAND.

chmod g-s ~ chmod og+xs ~ You must type the chmod command exactly as it is listed here. If each step is done correctly, nothing will appear to happen. You should see the % prompt. The ~ stands for your home or main directory. These commands will allow people to access files and directories in your home directory that have world read and/or execute permission.

7. Next, you will create a directory named .html in your home directory and give it appropriate permissions. This is where the web server will look for all of your public files. Type in the following command:

mkdir ~/.html If/when you see mkdir: Failed to make directory "/homes/yourname/.html"; File exists, just ignore it and move on to the next command, and type in:

chmod g-s,og+xs ~/.html The chmod command will allow everyone to access files and directories that are world readable and/or executable in your .html directory.

8. After completing this step, minimize the UNIX terminal.

9. Now, it is now time to upload your files to the .html directory using an ftp program.

10. If you are working in the CBA lab, you will use a program called WinSCP. You can find the WinSCP program in the START MENU of your computer.

11. Once WinSCP opens, you will need to type in the host name of unix.ksu.edu

Next, enter your eID/user name and your password. Then, click Login.

12. YOU MIGHT SEE A MESSAGE BOX POP UP INDICATING THAT THE SERVER’S HOST KEY IS NOT CACHED IN THE REGISTRY. CLICK YES. 13. If an Authentication Banner appears, click Continue.

14. If you see an errror box indicating “Invalid access to memory”, click OK.

15. The left-hand side of the screen shows your local site (local drives that you have available). Navigate to the storage media that you are using and click/double click it so that you can see the individual files that make up your web site.

16. The right-hand side of the screen shows the remote site (the directories within your unix storage space). Notice the .html directory/folder (it may be difficult to initially see). Once the transfer process begins, you will place the individual files that make up your web site in the .html folder.

17. Click/double click the .html folder to open it up. Initially, it will be empty.

18. To ftp/upload your files, you will simply use drag-and-drop to copy EACH INDIVIDUAL FILE from your local site (your storage media) over to the remote site (your html folder). DO NOT DRAG THE FOLDER CONTAINING YOUR WEB SITE FILES. Instead, drag the files INSIDE THE FOLDER. Make sure that you copy each of the files that make your web site work from the left side over to the right side. Otherwise, whatever you don’t copy over won’t show up when your site is viewed in a web browser.

19. If/when a Copy dialog box appears, click the Copy button.

Dragging from left-to-right is how you upload your files to the server.

Please be aware that dragging from right-to-left is how you download files from the server onto your storage media.

MAKE SURE THAT YOU SEND OVER THE INDIVIDUAL FILES AND ANY FOLDERS ASSOCATIED WITH THOSE FILES THAT WERE CREATED BY AN HTML EDITOR.

20. After you have transferred all of your files over to the unix storage area, verify that their spellings and capitalizations match how you typed them into your code. If you see an inconsistency, you will need to fix it (rename the file or fix your code and then ftp again). In addition, verify that you did indeed upload ALL OF THE FILES THAT MAKE YOUR WEB SITE WORK, including all .htm files and all picture/image files. Note: You must have the same file names in your UNIX account as you do in your index file or any other web page file that you create. If the file names are different or inconsistent, then one or more components of your web page won’t work.The next step is to go back to your UNIX terminal and set the permissions on your HTML files so that they are world readable and executable. Maximize your UNIX terminal and type the following command: chmod ugo+rx ~/.html/*

21. The final step is to set the permissions for any folder that was created by an editor that you also transferred over. The general form for setting permissions for a folder is: chmod ugo+rx ~/.html/foldername/*

For instance, lets pretend that I have a folder called Doc3_files. The command used to set the permissions for that folder is: chmod ugo+rx ~/.html/Doc3_files/*

Using the above steps, set the permissions for ALL FOLDERS that were created by the editor that you decided to use.

22. After setting the permissions for all folders, click the REFRESH button associate with the right-hand side of the WinSCP screen.

23. Notice the rights associated with each file seen in the picture. You should also see those same rights associated with all of the files in your html folder. If one or more of your files does not have those rights associated with them, then those will be elements that will not display on your actual web site. All files should have the rights of rwxr-xr-x If you have any items in your folder that do not have those rights, then you will need to type in the chmod ugo+rx ~/.html/* command again (and maybe even the chmod ugo+rx ~/.html/foldername/* command as well). 24. Once you are certain all of the elements that make up your web site have the correct rights, it is now time to bring up your web browser. Your home page can now be referenced with the URL

http://www-personal.ksu.edu/~eID/ (substitute your own eID in place of the letters eID. If you were visiting my personal site, you would type in http://www-personal.ksu.edu/~bkovar Remember, there is no need to enter the name of the file if you named your page index.htm or index.html.

REMEMBER TO GO BACK AND TEST OUT YOUR PAGE TO MAKE SURE THAT EVERYTHING LOADS PROPERLY AND THE LINKS WORK.

25. If you discover that your web site contains one or more errors, then you will need to fix your code/page and then upload it to the server once again.  If all you are doing is fixing a file and then replacing the old contents with the new contents, transferring from the left-hand side of the ftp screen to the right-hand side is all that you should need to do.  If you have deleted an existing file from the right-hand side or if you are uploading a file you forgot to upload earlier, then you will need to set the permissions for the file to be readable and executable. That means that you will need to type in the following command at the unix prompt: chmod ugo+rx ~/.html/* . If you ever need to upload a folder again, you will need to type in the following command at the unix prompt: chmod ugo+rx ~/.html/foldername/* (substituting the name of the folder for my foldername wording)

Recommended publications