I have an nfs device mounted. I am trying to set it with nosuid through /etc/fstab, but I am having trouble. I have set /etc/fstab correctly (I think), but here's the issue. When I reboot the system and run mount | grep nfs, I can see that it's not mounted with nosuid. Then, when I run umount -l sunrpc, and then mount sunrpc, it mounts correctly with nosuid.

Does anyone know what could be happening?


# mount |grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
# umount -l sunrpc
# mount sunrpc
# mount |grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,nosuid)


# /etc/fstab
# Created by anaconda on Thu Apr 19 09:13:00 2018
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
/dev/mapper/vg_opendcsoel6-lv_root /                       ext4    defaults        1 1
UUID=e3b1a0fb-c27f-42e9-ab93-15295497a293 /boot                   ext4    defaults        1 2
/dev/mapper/vg_opendcsoel6-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
sunrpc  /var/lib/nfs/rpc_pipefs         rpc_pipefs      nosuid  0       0

I guess you are mixing rpc_pipefs with nfs.

rpc_pipefs is helper necessary for nfs operation but it is not actual mount of remote nfs server. Most of the time it can be safely omitted from /etc/fstab (usually proper defaults for rpc_pipefs are hardcoded in nfs startup script which ignores /etc/fstab).

For example the following line is from my /etc/fstab (note nfs instead of rpc_pipefs in 3-rd column):   /mnt/host/git   nfs  defaults       0 0  /mnt/host/work  nfs  nosuid,noexec  0 0
  • Ahh, I see - This is interesting, I didn't know that. That would explain why it only works when I unmount and remount it. I will do a little more research, but if my findings are the same, I'll mark this one correct. Thank! – jonesy19 May 10 '18 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.