IF YOU DON’T APPEAR TO HAVE A PUB_HTML DIRECTORY, DO THIS ONE TIME PROCEDURE:
- Download & install WinSCP
- Use WinSCP to make a connection to rock.its.sfu.ca using your credentials.
- Navigate to your home directory.
- Create a new directory by selecting File(s) > New > Directory. A Create Folder dialog box will appear. Within the dialog box:
- Ensure you name the folder pub_html
- Change Octal to 0755
If you try to view your pages at http://www.sfu.ca/~account, and you get a message saying that 'access is forbidden', try:
- Change file permissions with WinSCP (for Windows)
- Log into your web account using WinSCP.
- Move into the directory where your files reside by double-clicking the folder in the right pane.
- To change the permissions, right-click the file name (for example, index.html) or folder whose permissions you wish to set. A pop-up menu window will open. Select Properties.
- The "Properties" window for the selected file will open. To change the permissions, you can either select the "Permissions:" checkboxes or edit the "Octal:" text field. Both the checkboxes and "Octal:" text field are synchronized, and a change in one area will be reflected in the other.
If individual pages within your site are responding with 'access is forbidden':
- Use WinSCP to make a connection to rock.its.sfu.ca using your credentials to make sure your web files are permitted appropriately:
- Navigate to pub_html, the following file types should have Octal 644 permissions:
- *.htm,*.html, *.gif, *.jpg
- This will ensure that all files that end with the indicated suffixes are world readable.
- Any sub-directories within pub_html, should be permitted 755:
- Any files within that subdirectory should be permitted 644 as illustrated above.
If you are using an scp/SFTP client that allows you to set default permissions:
- If you are using a graphical SFTP or scp client to upload your files that allows you to set permissions, set the software to transfer files with the permissions: owner: read/write, group: read, other: read; this is equivalent to setting the file to these permissions with the "chmod 644" command above.
- Very often the software will also have an option to "set the executable bit for directories" or "Add X to directories" as well ("X" means the 'executable bit', so both phrases mean the same thing). Choose that option, and specify "user", "group" and "other" if the software provides that option.
- This is an example of how the options might be presented in a typical graphical scp/SFTP client (this image is from the settings within WinSCP):