chmod 755 filename

Download Report

Transcript chmod 755 filename

ECT 250: Survey of E-Commerce Technology
FrontPage
Publishing pages
Unix
Outline
 FrontPage
• Hyperlinks
 Publishing Web pages on students.depaul.edu
• FTP
• Telnet
• Unix
2
Hyperlinks
There are four types of hyperlinks:
1. Links to external pages
2. E-mail address links
3. Links to internal pages
4. Links to bookmarks within the current
document
3
Links to external pages
To add a hyperlink to an external Web page:
• Select the text to be linked and click the link
toolbar button. (You can also choose Insert
and then select hyperlink). This will bring
up the Create Hyperlink dialog box.
• Type in the appropriate URL in the box and
click OK.
4
E-mail hyperlinks
To add an e-mail hyperlink:
• Select the text to be linked and click on the link
toolbar button to display the Create Hyperlink
dialog box.
• Click the mail icon to open the Create E-mail
Hyperlink dialog box. Type the appropriate
e-mail address and click OK.
• Click OK to finish creating the link.
5
Links to internal pages
To specify an internal link you must:
1. Select the text to be linked and click the
hyperlink toolbar button to display the
Create Hyperlink dialog box.
2. Browse the open pages or enter the path
to the internal page.
3. Click OK.
6
Relative paths
The relative path of a page is obtained by:
• Using the name of the file if it is in the same folder
as the Web page in which the link is created.
• Using ../ whenever you must move up a level in the
hierarchy of directories to reach the file.
• Using the name of a directory to move down the
hierarchy of folders.
When you publish the pages the files must have the
same relative structure or your path will be incorrect!
7
Examples
• Link from Theory Group page to CTI home page:
http://www.cs.depaul.edu
• Link from Theory Group page to my home page:
faculty/settle.htm
• E-mail link on my home page:
mailto:[email protected]
• Link from my home page to the Theory Group page:
../main.htm
8
Bookmarks
• You can specify that a hyperlink jump the user to
a particular location on the current page.
• This is done by placing a bookmark at the location.
(Do not confuse this bookmark with the one that
is created by a Web browser).
• When creating the link, you then specify both the
page and the bookmark on the page.
• Bookmarks are useful when you have long pages
with multiple, distinct sections.
9
Creating a bookmark
1. Select some text in the appropriate location.
Then choose Bookmark from the Insert menu.
The bookmark text will have a dashed underline
appearance in the FrontPage window.
2. Highlight the text to be linked to the bookmark
and click the hyperlink button to display the
Create Hyperlink dialog box.
3. Insert the appropriate page name and select the
bookmark from the Bookmark box.
10
Publishing the page
Now that we can create some basic Web pages,
we need to discuss how to publish these pages,
that is, make them available on the WWW.
In this course, all Web pages will be published
on the students.depaul.edu machine.
Next we learn how to move existing pages onto
students.depaul.edu. This requires using FTP
and Telnet, and learning some Unix commands.
11
The steps for publishing
1. Create the Web page(s) using FrontPage
2. FTP the page(s) over to students.depaul.edu
3. Telnet into your account and change the
permissions for all necessary files and
directories.
This will include all files transferred in the
second step.
12
FTP with a browser
To use a browser as an interface with FTP:
1. Type ftp://[email protected]
2. This will bring up a window that prompts you
for your password.
3. Type in your password (being careful to type
it correctly) and hit enter.
4. The files in your main directory will appear.
Example: ftp://[email protected]
Note: Be sure to check that the browser does not
store your password.
13
Other versions of FTP
You can also directly use FTP programs if they
are installed on your machine.
Examples:
• wsftp
• cuteftp
Most have GUI interfaces and work similarly to
the browser interface.
14
HTML directory
A Web server typically requires that any Web pages
that are to be published on the site must be located
in a particular directory.
On students.depaul.edu (and condor.depaul.edu)
that directory is public_html.
If you do not have a public_html directory you
must create one. All your web pages must be in
that directory or they will not be visible to browsers.
15
An additional requirement
All pages you will publish for this course must
be located in a subdirectory of public_html
called ect250.
You will NOT receive credit for your homework
if they are not located in public_html/ect250.
You must create the ect250 subdirectory since it
will certainly not exist.
16
Creating directories with FTP
To create a directory on students.depaul.edu
using FTP with the browser interface:
1. Select File
2. Select New
3. Select Folder
4. Click on the folder and give it the name
you wish it to have.
Alternatively you can use the new folder icon
in any GUI interface for FTP.
17
Moving files with FTP
Once you have created a public_html directory, you
can move your HTML files into that directory.
In order to do that:
1. Open up the directory into which you wish to
move the file.
2. Open the folder where the file is located on your
local machine.
3. Select Edit/Copy or drag the file directly into the
directory.
Example: Place pages into public_html/ect250.
18
The next step: Telnet
Once you can moved your Web pages into your
account, you now need to ensure that they are
visible to a Web browser.
This involves using Telnet to log into the students
machine and changing the access permissions on
the files and directories.
19
Directory permissions
To give direct_name the correct permissions
you must:
1. Directly log into your account (using Telnet)
2. Move into the parent directory of direct_name
using cd (change directory)
3. Type: chmod 755 direct_name
Examples:
1. public_html
2. ect250
20
File permissions
In order to give file_name the correct permissions
you must:
1. Directly log into your account (using Telnet)
2. Move into the parent directory of file_name
using cd (change directory)
3. Type: chmod 644 file_name
Example: Change permission for main.html
21
The steps for publishing
1. Create the Web page(s) using FrontPage
2. FTP the page(s) over to students.depaul.edu
placing them in public_html/ect250
3. Telnet into your account and change the
permissions for all necessary files and
directories. (To move from directory to
directory use the cd command).
This will include public_html, ect250,
and all files transferred in Step 2.
22
Warning about homework!
You must make sure that the permissions on your
directories and files are set correctly before you
submit your web assignments.
If your pages are not viewable you will simply
receive a zero on the assignment.
Helpful hint: Try to view your pages before you
submit the assignment to make sure it works!
23
Viewing your pages
Once you have created a public_html and an ect250
directory, located your files in it, and changed the
permissions to the correct values, you can view your
pages. To do so:
1. Open a browser
2. Type: http://students.depaul.edu/~name/ect250/main.html
3. This will bring up your 250 main page, that is, the
page called main.html in public_html/ect250/
Example: http://condor.depaul.edu/~tsettle/ect250/main.html
24
Some Unix commands
• Move to a child directory: cd directoryname
• Move up to a parent directory: cd ..
• List files/directories in the current directory: ls
• List files/directories with permissions: ls –l
• Create a new directory: mkdir directoryname
• Remove a file: rm filename
• Remove a directory: rmdir directoryname
• Rename (move) a file: mv oldname newname
• Change file permissions: chmod 644 filename
• Change directory permissions: chmod 755 filename
• Help on a Unix command: man commandname
25
Assignment 3
Assignment 3 requires you to produce a basic
Web page and then publish that page on the
students.depaul.edu machine.
You must:
1. Use FrontPage
2. Place the pages on students.depaul.edu
3. Ensure that the permissions are set correctly
4. E-mail me the URL
5. Complete ALL of this by the given deadline
For more details see the homework description.
26
Upcoming topics
 More Unix
 FrontPage
• Using and formatting images
• Adding tables for information or formatting
 Searching the Web
 Survey of markup languages
27