Design Resources

Contact Information

Univ Webmaster:

Stephen Taylor
webmaster@appstate.edu

Office: 828-262-6888
Fax: 828-262-2236
Location: 1128 ITS, Raley Hall

map

Change Text Size

A     A      A


Publishing and Editing Web Pages on PM

Set Up Your Account

You must request an account on PM from the webmaster's office prior to setting up your web site on this server. The public_html directory is usually created when your account is generated, unless you requested otherwise or had an account created on PM for other purposes.

To check that you have the necessary public_html directory and permissions, begin by logging into your account using ssh. ssh is an encrypted terminal session between your computer and the server. Many newer terminal programs offer this connection type, and is the preferred method for connecting to this server. Your username and password should be the same as those used to login to Novell or email. If your account was created recently, you may need to reset your password using the online form or by calling Technical Support (x6266) for further assistance.

> ssh username@pm.appstate.edu

After logging in type the following commands at the $ prompt (your prompt may vary depending on your shell and settings - $, %, or a custom prompt).

$ ls -l

drwxr-xr-x 15 strnglvdr clkwrk 4096 Jul 22 08:49 public_html

ls -l lists the directory contents in long format showing the permissions. If public_html already exists and the permissions are drwxr-xr-x, then you may skip to the next section, otherwise perform the following commands:

$ mkdir public_html
$ chmod u=rwx,g=rx,o=rx public_html
$ ls -l

mkdir creates a public_html directory in your account and chmod makes the directory group- and world-readable/executable. The public_html directory allows the webserver (and thus the Internet community) access to your web pages.

Where to store your personal web documents

You must have a public_html directory first before uploading your files

  • Your host is pm.appstate.edu
  • Your user id is your email user name
  • Your password is the same one you use for ASU email and Novell
  • Store all web documents in the public_html directory in your account.

Making Files World Readable

All files must be world readable to be accessed on this server. This permission setting should be the default but sometimes files are not set correctly. To make a file world readable use the following:

$ chmod u=rw,g=r=,o=r= filename.ext

More about File permissions

Setting correct file permissions is an important aspect of working on a shared web server. Permissions must allow other users to read pages and execute (open) directories, while preventing malicious or careless writing and deleting of your personal files by others. You can see your file permissions by typing 'ls -l' at the command prompt for the current working directory. File permissions are structured as a series of 10 characters:

d rwx rwx rwx (spaces added for readability)

'd' signifies that the item is a directory. Directories must have an 'x' bit in order to be opened. If it is not a directory, a '-' will appear in its place.

The first 'rwx' series is the owner permissions, and generally is set to rwx so the owner has full control over the file or directory although files only need to be set as 'rw'.

The second 'rwx' series is the group permissions. For a personal web directory, this is usually set to 'rx', allowing anyone in the group read and execute access to the files and directories. Because the default group for personal web directories is often the same as the user, this is not particularly important.

The third 'rwx' series is the other or "world" permissions. For personal web directories, this must be set as 'rx', allowing the web server to read files and execute directories. Write access is not suggested for this series, as anyone on the web server could potentially change or delete your files and directories.

The 'chmod' command is used to change the permissions (often referred to as the mode) of files and directories. chmod can use longhand or shorthand to set permissions - longhand syntax is easier to understand, but shorthand is easier to type. The following table illustrates longhand with the shorthand equivalent, for a variety of permission examples.

longhand shorthand ls -l appearance end result
chmod u=rwx,g=rx,o=rx testdirectory chmod 755 test d rwx r-x r-x owner has full control, groups and world can read and execute the directory 'test directory'
chmod u=rw,g=r,o=r file.html chmod 644 file.html - rw- r-- r-- owner can read and write, groups and world can read 'file.html'
chmod u=rw,g=,o= file.html chmod 600 file.html - rw- --- --- owner permissions remain unchanged, groups and world cannot access 'file.html'

Using longhand notation, the target user or group arguments are u (user), g (group) , o (other), followed by + (add), - (remove), = (set), and completed with the target directory or file name. Shorthand notation uses numerical representations to change the mode: 7=rwx, 6=rw, 5=rx, 4=r, and 0=no permissions. Personal preference and familiarity with command line dictates which notation you use - both methods achieve the same results.

More information regarding chmod usage can be found in the manual files (accessed by typing 'man chmod' at the command prompt) or searching Google for chmod and Unix file permissions.

How to upload files to your personal web directory

We recommend and support FTP clients which utilize sFTP for uploading to this server. sFTP, like ssh, encrypts the information between your computer and the server. WS_FTP and Fetch do not have sFTP capabilities. Cyberduck and Fugu, available for Mac OS X, are two examples of sFTP clients (and they're free!). Windows users should contact Academic Computing Services (ACS) about the availability of sFTP clients for their platform.

  • Open a connection to pm.appstate.edu
  • Change dir to the public_html directory in your account
  • Put the file(s) from your computer to the host

Netscape/Mozilla Composer has FTP capabilities, but is unsupported by the webmaster's office. Just click the publish icon and fill in the blanks. Use the following settings:

  • Your host is ftp://pm.appstate.edu
  • Your user id is your email user name
  • Your password is the same one you use for ASU mail
  • Site subdirectory is public_html

Clients using a web page editor such as Dreamweaver or FrontPage can use the site management features present in these programs on this server. Macromedia products are supported by the webmaster's office - Frontpage is not supported by the webmaster's office.

Macromedia 2004 MX Site Definition would be set up as follows for the Remote Info settings:

  • FTP host: pm.appstate.edu
  • Host directory: public_html/
  • Login: username
  • Password: password
  • Use Secure FTP (sFTP): checked!!!

Can I edit my web document using a standard text editor on the host system?

Yes: first login using ssh, then at the $ prompt enter:

$ cd public_html

You will be in your public_html directory. You can then use 'pico', 'vi', 'vim', 'vile', or 'emacs' (standard text editors on the system) to edit a file.

$ pico filename.html

or

$ vi filename.html

Can I process forms or do other cgi-bin programming on this system?

Yes. Create a cgi-bin directory in your public_html directory and chmod the directory to 0755. Call your scripts with cgiwrap (see cgiwrap manual for instructions on how to use this)

$ mkdir cgi-bin
$ chmod 0755 cgi-bin
$ man cgiwrap

Can I use a counter in my web document?

Yes. See How to use a web page counter on your web page. Users can create their own counter files in a forms interface using their VMS username and password to authenticate the process. Users can also reset their own web page counters using this same interface. Counters are kinda passé, though...

Can a user password protect or otherwise limit access to a page or pages?

Yes. You can find instructions on setting up .htaccess and .htpasswd files by searching your favorite search engine - here's one such tutorial.

On PM, the htpasswd program is located in /usr/bin

How do I view my page on the web?

The url for your web site on PM should be:

http://www1.appstate.edu/~username/

If you named your home page index.htm or index.html, this page should automatically appear, otherwise you will need to specify the page after your username

http://www1.appstate.edu/~username/pagename.html