/etc/exports and /etc/exports.d/, lists the directories that are made available over the network (exported). For each NFS share, only the given list of machines is granted access. More fine-grained access control can be obtained with a few options. The syntax for this file is quite simple:
/directory/to/share machine1(option1,option2,...) machine2(...) ...
fsid=0 و fsid=root صادر و شناسایی شده باشد.
*.falcot.com یا با محدوده نشانی IP به صورت 192.168.0.0/255.255.255.0 یا 192.168.0.0/24 شناسایی شوند.
ro). گزینه rw اجازه دسترسی خواندنی-نوشتنی را میدهد. برنامههای NFS معمولا از درگاه مختص به root استفاده میکنند (به عبارت دیگر، زیر ۱۰۲۴)؛ این محدودیت با استفاده از گزینه insecure میتواند برداشته شود (گزینه secure به صورت ضمنی درج میشود اما برای خوانایی بیشتر میتواند استفاده شود).
sync)؛ این کار میتواند با استفاده از گزینه async غیرفعال گردد. نوشتنهای غیر-همزمان میتواند اندکی عملکرد کلی را بهبود ببخشد، اما قابلیت اعتماد را نیز کاهش میدهند چرا که خطر از دست دادن داده زمانی که سرور بین فعالیتهای تایید نوشتن روی دیسک و انجام واقعی آن متوقف شود، وجود دارد. از زمانی که مقدار پیشفرض آن اخیرا تغییر کرده است (در مقایسه با مقداری قدیمی آن در NFS) تنظیم صریح آن توصیه میشود.
nobody user. This behavior corresponds to the root_squash option, and is enabled by default. The no_root_squash option, which disables this behavior, is risky and should only be used in controlled environments. If all users should be mapped to the user nobody, use all_squash. The anonuid=uid and anongid=gid options allow specifying another fake user to be used instead of UID/GID 65534 (which corresponds to user nobody and group nogroup).
sec سطح امنیتی مورد نظر خود را مشخص کنید: sec=sys گزینه پیشفرض است که ویژگی خاصی را شامل نمیشود، sec=krb5 تنها احرازهویت را فعال میکند، sec=krb5i محافظت از جامعیت داده را میافزاید و sec=krb5p کاملترین سطح امنیتی است که شامل محافظت از حریم شخصی میباشد (همراه با رمزنگاری). برای این منظور نیاز به یک راهاندازی آماده از Kerberos دارد (این سرویس در این کتاب پوشش داده نمیشود).
mount command and the /etc/fstab file.
مثال 11.20. اتصال خودکار با درج در فایل /etc/fstab
arrakis.internal.falcot.com:/shared /srv/shared nfs4 rw,nosuid 0 0
/shared/ from the arrakis server into the local /srv/shared/ directory. Read-write access is requested (hence the rw parameter). The nosuid option is a protection measure that wipes any setuid or setgid bit from programs stored on the share. If the NFS share is only meant to store documents, another recommended option is noexec, which prevents executing programs stored on the share. Note that on the server, the shared directory is below the NFSv4 root export (for example /export/shared), it is not a top-level directory.