Changes

Jump to: navigation, search

OPS235 Assignment 2 OLD

1,590 bytes added, 08:39, 27 July 2010
no edit summary
[[Category:OPS235]]{{Draft}}
{{Admon/note | Please take note! | Doing your assignment is part of your ongoing learning process. As such you will be tested on this material in future tests and exams. If you have any questions or need help, please consult your instructor in a timely manner. The due date for this assignment will not be extended. This assignment will be marked partially through demonstration and partially through the submission of files.}}
Weight: 5% of the overall grade<br>
Due Date: Week 13 - week of April 15Aug 9-19 13 ('''Check with your Professor for exact date''')
There are two main commands used to set the SELinux security context of files:
* setcon # chcon - sets the security context of a file to a particular value#* Example: setting the ''type'' of a file: <code>chcon -t ''unconfined_t'' ''/tmp/foo''</code>#* Example: setting the user/role/type of a file: <code>chcon ''unconfined_u:object_r:user_home_t'' ''~/foo''</code># restorecon - resets the default security context of a file#* Example: reset the context of one file: <code>restorecon /etc/services</code>#* Example: recursively reset the contexts of all of the files files in a directory: <code>restorecon -R ~</code>
You can reset the default security context of the entire system at the next boot with this command:
# Start the MySQL service (mysqld).
# '''When started for the first time, this service will print a message telling you how to set a password and take other basic steps to secure the the MySQL server.''' Follow those instructions to set a password, recording the detail of what you do for later use.
# Configure this software to start when the system is booted.
# Configure httpd to serve the <code>~/public_html</code> directories of your users. This will require changes to <code>/etc/httpd/conf/httpd.conf</code> as well as the SELinux configuration. See the man page for <code>httpd_selinux</code> and the Apache [http://httpd.apache.org/docs/2.2/ httpd documentation] for details.
# Prove that this works by creating a page in your <code>~/public_html</code> directory.The URL will be <code>http://''hostname''/~''your-user-id''/</code># Create a short web script which displays the available disk space on the computer. At its most basic level, a web script is the same as a regular script, with this additional requirement:#* It must output the line "Content-type: text/plain" or "Content-type: text/html" (depending on whether the script output is plain text or HTML), followed by a blank line.# Name the script <code>~/public_html/diskfree.cgi</code> - The URL will be <code>http://''hostname''/~''your-user-id''/diskfree.cfgi</code># Configure httpd and SELinux to allow your script to be run from the web. This will require changes to <code>/etc/httpd/conf/httpd.conf</code> as well as the SELinux configuration (possibly including both booleans and SELinux context). As with step 1, see the man page for <code>httpd_selinux</code> and the Apache [http://httpd.apache.org/docs/2.2/ httpd documentation] for details. {{Admon/tip|Hint|Look for an "add-handler" line in your httpd.conf file.}}
== Write-up ==
Create a write-up of this assignment on your wiki. Include at least these pages:
# A main page, describing in general terms what you did and containing links to the other wiki pages, as well as a link to the page in your <code>~/public_html</code> directory.
# A page for your httpd configuration. Include the exact text of your httpd.conf file.# A page for your MySQL configuration. Include the details of the steps you performed to set up MySQL.
# A page for your SELinux configuration. Include a list of all of your booleans and their current settings. Demonstrate that the configuration is as tight as possible (e.g., don't change booleans unnecessarily).
# A page for your MediaWiki configuration. Include your MediaWiki configuration file.
The easiest way to create new page is to create a link to it from an existing page (such as the main page), and then follow that link.
Resources on wiki markup:
* [http://en.wikipedia.org/wiki/Help:Wiki_markup Wiki markup] - Wikipedia
* [[Sandbox|Sandbox page on this wiki]] - examples
{{Admon/tip|Bonus Opportunity!|Change the default icon in the upper-left corner of your MediaWiki installation to a picture of your choosing. Be sure that you have copyright clearance to use that image (e.g., it is licensed to you, or it is your a pictureyou own).}}
== Submitting the Assignment ==
Check with your professor for the submission details for your section.
=== Sections E A & F - Chris Tyler ===
* Submit online through this link: https://cs.senecac.on.ca/~ctyler/ops235/a2/ by 11:59 pm, Friday, April 16August 13.
== Assessment ==

Navigation menu