Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

5.5. The /etc/exports file

If you are exporting file systems using NFS service, be sure to configure the /etc/exports file with the most restrictive access possible. This means not using wildcards, not allowing root write access, and mounting read-only wherever possible.

Example 5-1. Export file systems using NFS

Edit the exports file vi /etc/exports and add:
            /dir/to/export host1.mydomain.com(ro,root_squash)
            /dir/to/export host2.mydomain.com(ro,root_squash)
            
Where:

  • /dir/to/export is the directory you want to export.

  • host#.mydomain.com is the machine allowed to log in this directory.

  • The ro option mean mounting read-only.

  • The root_squash option for not allowing root write access in this directory.

For this change to take effect you will need to run the following command on your terminal:
            [root@deep]# /usr/sbin/exportfs -a
            

Note: Please be aware that having an NFS service available on your system can be a security risk. Personally, I don't recommend using it.

 
 
  Published under the terms of the Open Publication License Design by Interspire