File sharing through NFS
When systems need to share access to the same data set, they commonly use databases when the data is structured or a file server share when the data is unstructured. One of the most popular file-sharing capabilities in Linux is the use of the Network File System (NFS) service.
However, by default, NFS is not capable of handling extended attributes (needed for keeping track of the SELinux contexts). A number of possible implementations can be followed to enable NFS support on SELinux systems without great difficulty.
Setting up basic NFS
Start with the basic NFS setup to host the content. For instance, we might want to host the content under the /export
location, with two subdirectories: instance1
and instance2
. These subdirectories could then be mounted on web-server-hosting systems.
In the /etc/exports
file, put the file system to export through NFS together with the client list (a sort of coarse-grained access control list) and the options:
# cat /etc/exports
/export...