All of lore.kernel.org
 help / color / mirror / Atom feed
From: Murray McAllister <mmcallis@redhat.com>
To: SE Linux <selinux@tycho.nsa.gov>
Cc: Eric Paris <eparis@redhat.com>
Subject: user guide draft: "Examples: Booleans for NFS"
Date: Mon, 27 Oct 2008 13:14:20 +1000	[thread overview]
Message-ID: <4905320C.4090807@redhat.com> (raw)

Hi,

The following is a draft for the "Booleans" section. Any comments or 
corrections are appreciated:

Examples: Booleans for NFS and CIFS

By default, NFS mounts on the client side are labeled with a default 
context defined by policy for NFS file systems. In common policies, this 
default context uses the nfs_t type. Also, by default, Samba shares 
mounted on the client side are labeled with a default context defined by 
policy. In common policies, this default context uses the cifs_t type.

Depending on policy configuration, services, such as Apache HTTP Server 
and Samba, may not be able to read files labeled with the nfs_t or 
cifs_t types. This may prevent file systems labeled with these types 
from being mounted and then read or exported by other services. Booleans 
can be turned on or off to control which services are allowed to access 
the nfs_t and cifs_t types.

The setsebool and semanage commands must be run as the Linux root user. 
The setsebool -P command makes persistent changes. Do not use the -P 
option if you do not want changes to persist across reboots:

Apache HTTP Server

To allow access to NFS file systems (files labeled with the nfs_t type):
/usr/sbin/setsebool -P httpd_use_nfs on

To allow access to Samba file systems (files labeled with the cifs_t type):
/usr/sbin/setsebool -P httpd_use_cifs on

Samba

To export NFS file systems:
/usr/sbin/setsebool -P samba_share_nfs on

FTP (vsftpd)

To allow access to NFS file systems:
/usr/sbin/setsebool -P allow_ftpd_use_nfs on

Other Services

For a list of NFS related Booleans for other services:
/usr/sbin/semanage boolean -l | grep nfs

For a list of Samba related Booleans for other services:
/usr/sbin/semanage boolean -l | grep cifs

Thanks.

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

             reply	other threads:[~2008-10-27  3:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27  3:14 Murray McAllister [this message]
2008-10-29 12:29 ` user guide draft: "Examples: Booleans for NFS" Daniel J Walsh
2008-10-29 23:28   ` Murray McAllister
2008-10-30  4:25     ` Russell Coker
2008-10-30  5:38       ` Murray McAllister

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4905320C.4090807@redhat.com \
    --to=mmcallis@redhat.com \
    --cc=eparis@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.