|
Revised Sep 15 2004
This webpage describes the steps you need to take to allow the public
to view the webpages in your public_html directory. Note
that certain development and file-transport applications (like Fetch,
Dreamweaver, GoLive) preserve read permissions but you should verify
that your webpages are viewable by trying to view them yourself in a browser.
V3 of SSH
for Windows preserves a file's Read permissions when
you copy over it on the web server!
There are several methods you can use to set permissions:
- The 2 which work in your SSH Secure Shell window depend on
your type of computing interface:
- One very easy one is available in the Windows SSH
File Transfer.
- If you are using a web-publishing tool like Dreamweaver
or you use SSH V3 for Windows, your permissions should automatically
be set for world-viewing but you can verify that by viewing them with
a browser.
There are more details on permissions at the bottom in the Notes
section.
Setting Webpage Permissions in Shell Mode
- Start SSH Secure Shell and log in to u.arizona.edu.
You can start SSH by double-clicking the desktop icon that looks like
a white monitor with blue dots.
(If you already have a File Transfer window (SSH SFTP)
open, click the New Terminal Window button on the menu bar. It
looks the same as the SSH Secure Shell icon. You will automatically
be logged in if you had already logged in for SFTP.)
- Enter cd public_html to change to the directory
where your webpages are.
- Enter the command
wwwaccess
to set the correct permissions for all the webpages in that directory.
(Curious what wwwaccess
does?)
- If your file-transport application does not
preserve your file's read permissions, you will have to re-set the permissions
everytime you Put/Send your webpage.
When you are finished:
- exit your U-System session and exit the SSH
window
- Quit/Exit any tunneling session you were using
- Quit/Exit your publishing software
Setting Webpage Permissions in Menu Mode
- Start SSH Secure Shell and log in to u.arizona.edu.
You can start SSH by double-clicking the desktop icon that looks like
a white monitor with blue dots.
(If you already have a File Transfer window (SSH SFTP)
open, click the New Terminal Window button on the menu bar. It
looks the same as the SSH Secure Shell icon mentioned earlier.
You will automatically be logged in if you had already logged in for
SFTP.)
- On the main menu use the arrow keys to highlight Misc and press
Enter
- Highlight Permission and press Enter. (Note that this page
also tells you the precise URL for your homepage in the form
http://www.u.arizona.edu/~your_NetID
- You will see a response like
- When you are finished:
- quit your menu session and exit
the SSH window
- Quit/Exit any tunneling session you were using
- Quit/Exit any publishing software
- If your file-transport application does not
preserve your file's read permissions, you will have to re-set the permissions
everytime you Put/Send your webpage.
Setting Permissions in SSH's File Transfer Window
- This technique applies to Windows SSH.
- Start a File Transfer (versus Secure Shell) session
by double-clicking the SSH SFTP desktop icon that looks like
a yellow file folder with blue dots and log in to u.arizona.edu.
(You will automatically log in if you had already logged in for a Secure
Shell session.)
- In the right pane of the window right-click on the file
whose properties need to be set.
- In the pop-up window that appears select Properties.
- In the file's Properties window check all the Read boxes.
Copying and Verifying Permissions under Dreamweaver
Here is one way to verify that your webpage has universal read
access (there are many, many ways to do this):
- Under Dreamweaver's Site menu select Open Site for the
file-transfer tunnel that you have defined.
- On the toolbar select the Connect icon (two disconnected plugs).
- You will be prompted for your Password.
- At this point the Site - tunnel window shows directory
listings of the Remote Site and Local Folder.
- (You can put files on the U-System at this point,
if you haven't already done so, using the arrow icons or using
the Put option under the Site menu or by dragging
the file to the Remote Site part of the window and dropping
it).
- To verify that the webpage is publically viewable, click on it in
the Remote Site part of the Site window.
- Click on Preview in Browser under File to verify you
are able to view it.
- If you can successfully view your page, others can also, so the permissions
are set properly.
- The easiest way to verify that others can view your webpage
is to try to view it yourself in a browser pointed to
http://www.u.arizona.edu/~your_NetID
Notes:
- The last 2 bullets in this webpage
contain a couple more tips on permissions.
- You can view the webpages in your account ("NetID") by pointing
a browser to
http://www.u.arizona.edu/~your_NetID
(the character in front of your_NetID is the tilde from the upper-left
of your keyboard).
- Your public_html directory and any directories
under it need to have Execute access (711) allowed for
webpages under them to be viewed.
- Your webpage files need to have Read access (744)
so others can view them.
- As the "owner" you should generally keep Read,
Write, and Execute access (744) to all your "stuff",
although you do not need Execute access set on the webpages themselves
(so a 644 setting is adequate).
- You can view the access privileges of a file or directory by
issuing the command under the SSH Secure Shell interface
ls -al public_html
or, using the SFTP interface under Windows, right-click
any file or directory in the right pane.
- You can easily change the access privileges of all your files
and public_html by issuing the locally-written command under
the SSH Secure Shell interface
wwwaccess
or by clicking the checkboxes in the SFTP interface
after you right-click on an individual file or directory.
|