INLS161-001 Fall 2022

Tools for Information Literacy




Task 01.04: Create a Directory

Using a command line interface, create a new directory within your public_html space on Opal

Remember our convention.

commands argument value

Use a terminal connection and command line instructions to create a password protected directory

Log on to your Opal account using a terminal connection program and enter a temporary shell session at the command prompt (it should be $ in Unix).

Change to your public_html directory.
cd public_html

Create a new subdirectory within public_html to password protect.
mkdir newdirectory

The new directory doesn't have to be named "newdirectory",
but you should get into the habit of using consistent and logical directory and file names.

back to top

If you wish to, you may password protect your directory

Be careful not to inadvertently password-protect your public_html directory.

Use
pwd
to see where you are.
If you are not in your new directory, use
cd address-of-new-directory
to go to it.

What does "address" mean?
It means the argument is the location of the directory, relative to where you are now.
For example, if you are here and you want to change directories to here ...

your command would read cd public_html/new-directory
or, change directory first down to public_html and then one more step down to new-directory

Once you are sure where you are, type
htdirpass.pl
and hit Enter. This will activate a script that automatically creates several files for you.

Verify that you are in the directory you want to protect and follow the instructions on the screen.

The program creates two files in the directory you are protecting:
.htaccess and .htpasswd

You won't see these files on a regular ls command, you must type ls -a.

Don't delete the files unless you want to remove the password protection.

back to top

Protected directory

Submit the name of your password protected directory to the Sakai assignments space

Although, clearly your directory name can be anything you want it to be (it doesn't have to be newdirectory)

Also, if you have password protected it, be sure to include the userid and password needed to access this directory in the Sakai assignments space.

back to top

Viewing Your Webspace

After you have uploaded your files and set the correct permissions, your webpage will be viewable at https://opal.ils.unc.edu/~onyen/ . This will take you to the index page (if there is one) in your public_html folder; you can also navigate directly to other pages or subfolders you've added, such as https://opal.ils.unc.edu/~your_onyen/my_directory/a_newly_created_page.html

back to top

Copyright © R.E. Bergquist 2014- | Last Updated on | Powered by w3.css