| | |

Allowing root Access to NFS Directories

For local filesystems, root usually has full access (read/write) to directories/files inside of it.

But for NFS directory mounted from network, root usually has no permission to write to directories or files within the NFS directory. How to make root act similarly in an NFS directory to the behavior in local directories?

The reason that NFS directory is non-accessible to root is likely root_squash.

It assigns them the user ID for the user nfsnobody and prevents root users connected remotely from having root privileges. This prevents unauthorized alteration of files on the remote server.

To disable root_squash, set the no_root_squash option. It turns off root squashing. But it is suggested to only use this option when it is suitable and necessary.

For example, to disable root_squash for /mnt/a. The line in /etc/exports can be:

/mnt/a 10.0.0.0/16(rw,no_root_squash)

Similar Posts

  • Xen HVM DomU configuration file

    An example of Xen HVM DomU configuration file. An example for install the OS from an ISO: name=”10.0.1.235″ vcpus=2 memory=2048 shadow_memory=8 disk=[‘file:/lhome/xen/vm-10.0.1.235/vmdisk0,xvda,w’, ‘file:/lhome/Linux-x86_64-DVD.iso,xvdc:cdrom,r’] vif=[‘bridge=xenbr0′] kernel=’/usr/lib/xen/boot/hvmloader’ builder=’hvm’ device_model=’/usr/lib64/xen/bin/qemu-dm’ extra=” vnc=1 vnclisten=”0.0.0.0″ vncpasswd=’1234567′ # vncdisplay=1 vncconsole=1 on_reboot=’restart’ on_crash=’restart’ An example for run the VM after installation: name=”10.0.1.235″ vcpus=2 memory=2048 shadow_memory=8 disk=[‘file:/lhome/xen/vm-10.0.1.235/vmdisk0,xvda,w’] vif=[‘bridge=xenbr0′] kernel=’/usr/lib/xen/boot/hvmloader’ builder=’hvm’ device_model=’/usr/lib64/xen/bin/qemu-dm’ extra=” vnc=1…

  • Howto: ssh automatically add new hosts to the list of known hosts

    When managing many hosts, answering 100s of “yes” can make us crazy. In a trusted environment, let ssh automatically add the new hosts to the list of known hosts and free us from typing “yes”es. How to enable it? Method 1. Passing option to ssh ssh -o StrictHostKeyChecking=no username@host Method 2. Configuring ~/.ssh/config To automatically…

  • MFC中屏蔽ESC和回车关闭对话框

    解决方法是在CDialog::PreTranslateMessage() 的重载函数中将ESC和回车按键的消息处理掉. 直接上代码: BOOL CResultCollectorDlg::PreTranslateMessage(MSG* pMsg) { if(pMsg->message == WM_KEYDOWN) { switch(pMsg->wParam) { case VK_RETURN: //回车 return TRUE; case VK_ESCAPE: //ESC return TRUE; } } return CDialog::PreTranslateMessage(pMsg); } Read more: MFC程序使用系统风格界面 Send Messages to Other Windows Using Win32 API 禁止对话框关闭按钮和Alt+F4 使用MFC在一对话框中嵌入另一对话框 一个非常优秀的MFC Grid控件 Win32 Programming: Operation on Files x86-64 ISA / Assembly Programming References Linux…

  • Good free images hosting services on the Web?

    Suggestions on some good free images hosting services on the Web? Two good free image hosting websites: Imgur: http://imgur.com/ Postimage.org: http://postimage.org/ Read more: Shared hosting services with SSH enabled Free server images – SysTutorials QA Where to search and download free images? Are there good free CDNs on the Web How to get a free…

  • Free VNC server software on Windows

    RealVNC only gives free version to personal usage of their server software while it limits the functions. Could you suggest some good free VNC server software with full functions? TightVNC is an open-source software for VNC with servers and clients. You can download the server software for Windows from TightVNC download page: http://www.tightvnc.com/download.php The software…

2 Comments

  1. I don’t normally care about spelling, but in this case, I think the article would be clearer (and safer to copy/paste from) if “root_squash” were spelled correctly throughout. It appears as “root_swash” in a couple of places.

Leave a Reply

Your email address will not be published. Required fields are marked *