Managing Files on the UNC Server

About This Document

This document provides a description of the UNC server space provided to faculty, staff and students. It also links to tools for accessing and managing an individual's server space at a more advanced level. It focuses on understanding the structure of directories and files within a users' web space. The material covered in this document is the prerequisite to all other courses taught in the Internet Training series.

Overview of Your UNC Server Space

Everyone who's part of the UNC community is entitled to a UNC email account, space for storing computer files and space for a website. UNC undergraduates get 100 megabytes of storage, and faculty, staff and graduate students get 250 megabytes (see ITS Data Storage Policy for more info). UNC uses a program called AFS (Andrew File System) to manage all of its users' accounts. AFS allows Windows and UNIX computers to be connected into a single network, or server. This makes it easy for you to accesss your storage space on the UNC server through the familiar Windows interface (see Windows: Getting Started for an introduction to the Windows operating system).

One important thing to realize about user space on a computer network is that everyone using the network has varying degrees of access to other users' files. Your UNC computer account is created with this fact in mind, and contains a number of default folders designed to help you keep your files organized and private. These folders, their recommended uses, and those who can access them are listed below.

Table 1. Folders Table

Folder Name

Recommended Use

Who Can Access It (Permissions)

Home Directory ( e.g. the person's first two initials followed by their last name)

 

Anyone logged into the UNC system can see what files and folders are stored here, but not the actual contents of these files.

bin

Store executable programs.

Same as your Home Directory.

documents

Use this to backup files from your pc, etc.

Only the account owner (you).

private

 

Same as documents

public

Store files you want to share.

Anyone can view a list of the files and their contents.

public_html

Your website.

Any computer connected to the world wide web can see the contents of all files stored here.

OldFiles

Each night, UNC backs up all of the files in your Home Directory and stores them in OldFiles. You can use OldFiles to recover any work you accidentally deleted.

Same as your Home Directory.

When you create a new folder anywhere in your Home Directory, that folder will inherit the permissions of the folder you created it in (i.e. all folders you make in public will be accessible by anyone; all folders you make in private will be accessible only by you). Keep in mind, however, that UNC computer administrators always have complete access to everything in your user account. For more detailed information on your UNC server space, see Your AFS File Space at UNC. For more on working with folder permissions, etc., see Introduction to AFS.

Accessing Your Server Space

On Campus

Accessing your UNC server space from any of the ITS public labs on campus (or any school computer you log onto using your Onyen and password) couldn't be easier. On all of these computers, your file space is configured as the H:\ drive and has the same name as your Home Directory. Your H:\ drive is available just like any other drive on a Windows machine. You can use the shortcut to your Home Directory on the desktop, or open My Computer and access the H:\ drive from there (see Windows: File Management if you need help negotiating drives and folders).

Off Campus

ITS provides access to two programs that let you get to your UNC server space from any computer with internet access or a modem. The first of these is called OpenAFS. Once you install OpenAFS on your computer, you can access your UNC space just like you do from the ITS labs. You can download and install OpenAFSfollowing the links and detailed instructions in the Installing the AFS Client on Windows XP/2000/NT document. Users of Windows 2000 or higher should use OpenAFS.

A second method that is useful for transferring files between your UNC account and another computer is called SFTP. You can also use SFTP to create and delete folders in your server space. For instructions on downloading and using SFTP see File Upload and Download (SFTP).

Onyen and Email Management

The UNC Onyen Services page [ https://onyen.unc.edu] provides links for creating and managing your UNC computer account. The Onyen management tools available here include changing your password, changing the name associated with your Onyen, checking how much disk space you're using, and viewing public details of other Onyens.

Email management features on the Onyen Services page include access to UNC Webmail, subscribing to UNC email lists, forwarding your UNC email to another email address, setting an alias, setting a vacation message, and checking details of your email account.

Web Publication Services

You can also set up a number of additional services from the Onyen Services page. We will use the Web Publication Services to configure your UNC web space. Remember, the files you put in your public_html directory are visible on any computer in the world connected to the Internet.

The procedure for configuring your web space is straightforward. Open the Onyen Services page [ https://onyen.unc.edu], scroll down and click the Subscribe to Services button. After you enter your Onyen and password and press Continue, click the WWW (Web Publication Services) button. Read through the terms of agreement, select the circle next to "I understand and agree to the above terms.", and click Continue. At this step, a page comes up with a link to your web page.

Note: If you don't plan to publish files to the UNC web server, you still have other options and sources of help:

Internet Name Conventions

As stated earlier, AFS allows computers running Windows and computers running UNIX to work together in a single network. Because of the two separate operating systems involved, occasional differences in terminology or convention arise when discussing your UNC server space. You are most likely to encounter these differences when working with your web space (i.e. everything in your public_html folder), because the world web wide is primarily a UNIX-based system. We'll take a look at a few things you should be aware of to ensure that you get the most out of your UNC account.

Directories vs. Folders

"Directory" and "folder" mean exactly the same thing any time you encounter either term in any of the ITS documentation. "Directory" is the original UNIX term, and "folder" is a term employed by Windows. So when we're talking about Windows we often use the term "folder" and when we're talking about the UNIX side of things (i.e. your website), we usually say "directory".

Folders vs. Files

Folders on a computer are analogous to a regular old folder that you put in a filing cabinet to keep your files organized. Folders (or directories) don't actually do anything; their only purpose is organizational. Files, on the other hand, either do something (i.e. applications like MS Word or Netscape are files) or contain data (i.e. a song you downloaded or a paper you typed). So folders are used to store files.

File Names

File names usually consist of two parts: a name and an extension (i.e. filename.ext). Generally, you're free to use any combination of characters and numbers in a file name. The extension is usually assigned automatically by the program that created a particular file. In other words, when you save a file you created with MS Word, it usually appends a .doc extension to the filename ( filename.doc). So the purpose of the extension is to tell the operating system which program it should use to open a file. Programs that open web files are generally set up to look for a .html extension.

Internet Naming Caveats

UNIX and Windows have slightly different conventions for handling directory and file names, but these differences are very important when it comes to naming your Internet files:

  • Web pages are case-sensitive, which means that capitalization matters to the programs that display your internet files. To avoid confusion, use all lower case letters in your Internet directories, file names and extensions.
  • Many programs that people use to view or create web pages do not treat spaces in file names consistently. Therefore, do not use spaces in your internet directories or filenames. You can fill in any spaces with an underscore, as in my_internet_file.html.
  • Many programs that people use to create web pages automatically assign a .htm extension to your files, while others assign a .html extension. (The .htm extension is left over from the old days when Windows could only handle three-letter extensions, whereas UNIX has always expected .html.) This can make it very difficult to create links and troubleshoot your site later on. For this reason, always include the full .html extension in your internet filenames.

The Importance of index.html

All web browsers (e.g. programs like Internet Explorer and Netscape) are designed to look for and display a file called index.html for any directory the user visits on a website. If the web browser doesn't find an index file, it will simply display a list of all the files contained in that particular directory. This may be undesirable both aesthetically and from a security standpoint; without an index file, you give users direct access to the directory structure of your website. So you should always provide an index.html file for all directories including your public_html directory (you may have noticed there's a default index file in your public_html directory already).

Your Website's Directory Structure

Just as there are minor differences in naming files in Windows vs. Unix, there are also slight differences in the way that Windows and UNIX indicate the location of files on a computer. The purpose of this section is to make sense of these differences in relation to your internet files and directories.

All operating systems make use of the idea of a "path" to locate files. The path is analogous to the directions you would give someone if you were asking them to locate a particular file in a given folder in your filing cabinet. For example, if you had printed a Word document called "Paper One" and stored it in a folder called "School" in your filing cabinet labeled "H", and someone asked you where it was, you could say "Go to filing cabinet "H", look in the "School" folder, and you'll see "Paper One" in there." In Windows terminology, we could write those directions as H:\School\Paper One.doc.

Alternatively, if we're using Windows to access our web space ( public_html), the path would be H:\public_html.

If someone wanted to access this same file via the internet, they would have to use a web browser and supply a UNIX-style path, in this case called a URL (Universal Resource Locator). The UNC computer system automatically maps your public_html directory to a web-based URL as follows, where you substitute your actual user id for the word "onyen":

http://www.unc.edu/home/onyen

In other words, H:\public_html and http://www.unc.edu/home/onyen are two ways of describing the same location, depending on whether you're using Windows or the internet. (Notice that URLs use forward slashes "/" whereas Windows paths use back slashes "\"). For more on interpreting the various parts of a URL, see Internet Essentials.

If you stored a file called my_file.html in you public_html directory, its Windows path would be H:\public_html\my_file.html and its URL would be http://www.unc.edu/home/onyen/my_file.html. In both cases these paths simply mean "Go to Onyen's public_html folder and get the file called my_file.html."

If you created a new directory in your public_html directory called research, and within research created a file called index.html, its Windows path would be H:\public_html\research\index.html, and its URL would be http://www.unc.edu/home/onyen/research/index.html. Again, we would read these paths as "First go to Onyen's public_html folder, from there go the research folder, and then get the file called index.html."

What's Next

From here, you're qualified to enroll in any of the Internet Training series, where you can learn how to create web pages (.html files) using Dreamweaver, Netscape, or hand-coding HTML.


Top
University of North Carolina - Chapel Hill