CodexBloom - Programming Q&A Platform

Debian 11 - how to to Set Up a Persistent NFS Mount with 'Permission Denied' Errors

👀 Views: 13 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-08
nfs debian fstab bash

This might be a silly question, but I've hit a wall trying to I'm trying to debug Hey everyone, I'm running into an issue that's driving me crazy... Hey everyone, I'm running into an issue that's driving me crazy... I am trying to set up a persistent NFS mount on my Debian 11 server, but I'm running into issues with 'Permission Denied' errors even though my `/etc/fstab` configuration seems correct. The NFS server is running on another machine with an IP of `192.168.1.100`, and I want to mount the shared directory `/exports/shared` to `/mnt/shared` on the client machine. I've added the following line to my `/etc/fstab`: ```bash 192.168.1.100:/exports/shared /mnt/shared nfs defaults 0 0 ``` After running `mount -a`, I receive the behavior: `mount.nfs: access denied by server while mounting 192.168.1.100:/exports/shared`. I've double-checked the NFS server configuration and the exports file looks like this: ```bash /exports/shared *(rw,sync,no_root_squash) ``` I verified that the NFS service is running with `systemctl status nfs-server`, and I also checked the firewall settings to ensure that NFS is allowed through. The `showmount -e 192.168.1.100` command shows that the shared directory is being exported as expected. On the client side, I've tried running the mount command manually: ```bash sudo mount -t nfs 192.168.1.100:/exports/shared /mnt/shared ``` However, I still get the same permission denied behavior. I have also looked into the NFS version compatibility and used the `vers=3` option in the fstab entry: ```bash 192.168.1.100:/exports/shared /mnt/shared nfs defaults,vers=3 0 0 ``` This did not resolve the scenario. Can someone guide me on why I might be working with these permission errors and how to correctly set up the NFS mount persistently? For context: I'm using Bash on macOS. What's the best practice here? For context: I'm using Bash on Windows 11. I'm on Windows 10 using the latest version of Bash. Thanks for any help you can provide! I've been using Bash for about a year now. What am I doing wrong?