Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying SELinux Cookbook
  • Table Of Contents Toc
SELinux Cookbook

SELinux Cookbook

By : Sven Vermeulen
4.3 (7)
close
close
SELinux Cookbook

SELinux Cookbook

4.3 (7)
By: Sven Vermeulen

Overview of this book

If you are a Linux system administrator or a Linux-based service administrator and want to fine-tune SELinux to implement a supported, mature, and proven access control system, then this book is for you. Basic experience with SELinux enabled distributions is expected.
Table of Contents (12 chapters)
close
close
11
Index

Using custom content types


Next up is to create our own set of content types for a web application that does not have a policy associated with it yet. We will use DokuWiki (available at https://www.dokuwiki.org) as an example.

Getting ready

Install DokuWiki either through the Linux distributions' package manager or manually through a downloaded release from the main site. In this example, we assume that DokuWiki is installed at /srv/web/dokuwiki/.

How to do it…

To use custom web content types, follow the next set of steps:

  1. Create a policy called mydokuwiki.te with the following content:

    apache_content_template(dokuwiki)
  2. Add a file context definition file called mydokuwiki.fc, which contains the following code:

    /srv/web/dokuwiki/lib/plugins(/.*)?  gen_context(system_u:object_r:httpd_dokuwiki_rw_content_t,s0)
    /srv/web/dokuwiki/conf(/.*)?  gen_context(system_u:object_r:httpd_dokuwiki_rw_content_t,s0)
    /srv/web/dokuwiki/data(/.*)?  gen_context(system_u:object_r:httpd_dokuwiki_rw_content_t,s0)
    /srv/web...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
SELinux Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon