1,576
edits
Changes
no edit summary
{{Admon/caution|THIS IS AN OLD VERSION OF THE ASSIGNMENT|'''This is an archived version. Do not use this in your OPS235 course.'''}}
= OPS235 Assignment 2 =
'''Weight: ''' 5% of the overall grade
'''Due Date: 8th of August at the start of class''' Week 13 <br />Refer to your instructor for submission instructions
==== Serving Personal Web Pages (Section Total: 12 Marks)==Configuring MySQL ==
== About SELinux Submitting Your Assignment ==
{| class="wikitable" border== SELinux Context Commands ==="1"! Task !! Maximum mark !! Actual markThere are two main commands used to set the SELinux security context of files:|-# chcon - sets the security context of a file to a particular value| Correct packages installed || 1 ||#* 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>| Firewall setup properly || 2 ||# restorecon |- resets the default security context of a file#* Example: reset the context of one file: <code>restorecon /etc/services</code>| Apache set up and running || 2 ||#* Example: recursively reset the contexts of all of the files in a directory: <code>restorecon |-R ~</code>| MySQL set up correctly || 3 ||You can reset the default security context of the entire system at the next boot with this command:|- touch /.autorelabel === SELinux Booleans === SELinux policy can be tuned (without writing an entirely new policy) through the use of ''booleans'' or option switches. Each boolean can have a value of on (| Wordpress extracted correctly || 1) or off (0).|||-The <code>getsebool</code> and <code>setsebool</code> commands can be used to view and | Wordpress set SELinux boolean values:up correctly || 2 |||-{|class="mediawiki sortable" border="Wordpress showing in Firefox || 1" cellspacing="0"||!Command|-!Description| Everything ready to show || 2 ||
|-
|<code>getsebool -a</code>First blog post || 3 ||Displays all SELinux booleans
|-
|<code>getsebool ''foo''</code>Second blog post || 3 ||Displays the SELinux boolean ''foo''
|-
|<code>setsebool ''foo'Total' ''value''</code>|Sets the SELinux boolean ''foo'' to ''value'' (where ''value'' is 0 or "off", or 1 or "on")| 20 || Use the <code>-P</code> option to make the change permanent.
|}
[[Category:OPS235]]