Unit 3.1 Exercise Answers
Write the document-relative path to the file you wish to access.
The document-relative path to the file you wish to access, menu.htm, is written as:
homework/menu.htm
Since your current directory is the classnotes directory,
you must navigate downward though the directory tree to the subdirectory,
homework, in order to access the menu.htm file.
Write the root-relative path.
Conversely, the root-relative path to the file you wish to access, menu.htm, is written as:
/classnotes/homework/menu.htm
Write the document-relative path you'd need to access the notes_one.htm file.
The document-relative path you'd need to access the notes_one.htm file is written as:
../../notes_one.htm
Since your starting point is the homework_one directory, note that it is necessary for you to navigate upward a total of two directories in the directory tree. Hence the notation, "../../".
Write the path you would use to link to the "myfile.gif " image. Assume that you'd like to change access permissions for the notes_one.htm file once you've accessed it.
The path you would use to link to the "myfile.gif " image would be written as:
http://www.anotherserver.com/mydirectory/myfile.gif
Since the file is located on another server, and not in the Web site's docroot, an absolute path must be used.
Write the command you would use to grant the following
permissions to the following levels of users:
user/owner group other All permissions Read and execute only No permissions granted yet The command you would use to grant these permissions
accordingly would be written as: In order to set permissions for files in UNIX, you
use the "change mode," or chmod, command. The "7" in the first position
of the three-digit number outlining permissions to be granted denotes
that all permissions have been granted to the "user/owner" level, (4(read)
+ 2(write) + 1(execute) = 7(all three permissions). The "5" in the second
position of this three-digit number denotes that only two of the possible
three permissions have been granted to the "group" level (4(read) + 1(execute)
= 5(read and execute permissions only)). Lastly, the "0" in the third
position of this three-digit number denotes that no permissions whatsoever
have been granted to the "other" level. Therefore, in this example, this
file has not yet been made publicly available.
chmod 750 notes_one.htm