User Tools

Site Tools


computing:linux:selinux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
computing:linux:selinux [2013/09/10 10:00]
gcooper
computing:linux:selinux [2014/11/22 17:29] (current)
gcooper
Line 29: Line 29:
 </file> </file>
  
-==== Disable selinux ====+===== Disable selinux ====
 + 
 +Edit the config file and set to ''disabled'':
  
 <file> <file>
-vim /etc/selinux/config +sed -i 's/enforcing/disabled/g' /etc/selinux/config /etc/selinux/config
- +
-SELINUX=permissive # or disabled+
  
 setenforce 0 setenforce 0
 </file> </file>
 +
 +===== NFS =====
 +
 +http://serverfault.com/questions/554659/selinux-contexts-with-nfs-shares
 +
 +For a NFS mounted web folder (i.e. a folder writable by the Apache web server in /var/www/html/), edit the ''/etc/fstab'' mount options:
 +
 +<file>
 +vim /etc/fstab
 +</file>
 +
 +<file>
 +# Mount the NFS data store
 +ip.of.nfs.srv:/path/to/share    /var/www/html/folder_name/  nfs  _netdev,context="system_u:object_r:httpd_sys_rw_content_t:s0"  0 0
 +</file>
 +
computing/linux/selinux.1378828814.txt.gz · Last modified: 2013/09/10 10:00 by gcooper