CodexBloom - Programming Q&A Platform

Trouble mounting NFS share on Ubuntu 20.04 with 'permission denied' scenarios

👀 Views: 394 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-21
linux nfs ubuntu bash

I'm maintaining legacy code that I'm trying to mount an NFS share from a remote server (CentOS 7) onto my Ubuntu 20.04 machine, but I'm working with a 'permission denied' behavior when I attempt to access the share after mounting it. The command I used to mount the NFS share is: ```bash sudo mount -t nfs 192.168.1.100:/exported/path /mnt/nfs ``` When I run `df -h`, the share appears to be mounted correctly, but when I navigate to `/mnt/nfs`, I get: ``` ls: want to access '/mnt/nfs': Permission denied ``` On the CentOS server, I have the NFS export configured in `/etc/exports` as follows: ```bash /exported/path 192.168.1.0/24(rw,sync,no_subtree_check) ``` I've also verified that the NFS service is running on the CentOS server with `systemctl status nfs-server` and confirmed that the firewall allows NFS traffic. Running `showmount -e 192.168.1.100` from my Ubuntu machine shows the exported paths correctly, indicating that the client can see the NFS exports. Additionally, I've tried changing the permissions of the NFS exported directory to 777 temporarily to rule out permission issues, but I still receive the same behavior. I suspect there might be an scenario with UID/GID mismatches, but I've confirmed that the user IDs match on both systems. Any suggestions on what might be causing this 'permission denied' behavior? The stack includes Bash and several other technologies. Thanks for taking the time to read this! I'm working in a Debian environment. Any feedback is welcome!