Uploading Files With Secure Shell
From Web Development
Contents |
For www.gmu.edu or mason.gmu.edu
Prerequisites
- A Mason Cluster account
- The SSH Secure Shell Application (Free download)
IMPORTANT: Fix Server Upload Permissions
The default setting for newly uploaded files is that they are only readable by the user that uploaded them. This results in a "Forbidden" error when the files are viewed through a web browser.
Follow this tutorial to adjust this setting:
Connect to the Server
- Open up the Secure File Transfer Client.
- Hit Quick Connect and enter
mason.gmu.edufor the Host Name, and your username. - If this is your first time connecting, you'll probably get a few warning messages. Push OK to clear those.
- Enter your mason.gmu.edu password
If you've logged in successfully, the pane on the right should show files on the server. If this is your first time connecting, it will probably be empty.
Personal Sites
If you're uploading files to your personal site, you should see a public_html folder. Double-click on it to enter that folder. If you do not see a public_html folder, please follow the instructions in this guide:
Colleges, Departments, and Student Organizations
On the right, above the file pane there should be a text box. It probably says something like /home/u1/username.
Replace the contents of that box with the following:
/usr/local/htdocs/your_directory_path
(Replace your_directory_path appropriately. For instance, if your site is located at www.gmu.edu/departments/english, your_directory_path would be departments/english)
You should now be in the folder for your department or organization.
Uploading Files
You can either:
- Navigate to your web site files on your hard drive in the left pane, select the files you'd like to upload, right-click your selection, and choose Upload.
- or you can drag files directly from your Desktop (or some other folder on your computer) to the pane on the right.
Note: Be careful uploading, especially if this is your first time. It's always prudent to make backups before overwriting any critical files.
For gunston.gmu.edu
Prerequisites
- A gunston.gmu.edu account
- A MESA login and password
- The SSH Secure Shell Application (Free download)
Connect to the Server
- Open up the Secure File Transfer Client.
- Hit Quick Connect and enter
gunston.gmu.edufor the Host Name, and your MESA username. - Enter your MESA password
OK, if you connected successfully, you should see your local files on the left, and the server files on the right (if this is your first time connecting, there is probably a readme.txt file in the right-hand pane).
Move to the Proper Directory
On the right, above the file pane there should be a text box. It probably just has a / in it.
Replace the contents of that box with the following:
/your_directory_path
(Replace your_directory_path appropriately. For instance, if your site is located at gunston.gmu.edu/example, your_directory_path would be example)
You should now be in the folder for your department or organization.
Uploading Files
You can either:
- Navigate to your web site files on your hard drive in the left pane, select the files you'd like to upload, right-click your selection, and choose Upload.
- or you can drag files directly from your Desktop (or some other folder on your computer) to the pane on the right.
Note: Be careful uploading, especially if this is your first time. It's always prudent to make backups before overwriting any critical files.