Bobcares

Proxmox NFS Mount Error: Access Denied | Solution

by | Jan 9, 2025

Learn how to fix the “Access Denied” error when mounting NFS share in Proxmox VE. Our NFS Support team is here to help you with your questions and concerns.

Proxmox NFS Mount Error: Access Denied | Solution

Proxmox NFS Mount Error: Access Denied | SolutionIf you have run into the “access denied” error while trying to mount a Network File System (NFS) share in Proxmox VE, you are in luck!

According to our experts, this error usually indicates that the Proxmox server lacks permission to access the NFS share. Today, we will look at common causes and step-by-step solutions to resolve the issue.

Common Causes of the “Access Denied” Error

  • The NFS server’s export file (`/etc/exports`) may not allow access to the Proxmox server’s IP address or subnet.
  • Firewalls on the NFS server or Proxmox server may block the traffic required for NFS communication.
  • User IDs (UID) or group IDs (GID) on the Proxmox client and the NFS server may differ, leading to denied access.
  • Proxmox might attempt to use an unsupported NFS version (e.g., NFSv4) on the server.
  • The Proxmox server may not have proper network connectivity to the NFS server.
  • The NFS server may not be running, or the shared directory may not be properly exported.

Steps to Diagnose and Resolve the “Access Denied” Error

  1. First, ensure the NFS server allows access to the Proxmox server’s IP address.
  2. Then, open the NFS export file on the NFS server (`/etc/exports`) and verify permissions.

    For example of `/etc/exports`:

    /mnt/share_dir 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check)

    Key settings:

    • `rw`: Enables read and write access.
    • `sync`: Writes data to disk immediately.
    • `no_root_squash`: Allows root access from the client.
    • `no_subtree_check`: Disables additional subdirectory checks that may cause issues.

    Apply the changes:

    exportfs -ra

    Now, confirm that the Proxmox server’s IP address has access:

    showmount -e

  3. Also, verify that the NFS service is running on the server:

    systemctl status nfs-server

    Start the service if it’s not running:

    systemctl start nfs-server

  4. Allow NFS traffic through the firewall on both the NFS server and Proxmox.

    Common NFS Ports:

    • TCP/UDP 2049 (NFS)
    • TCP/UDP 111 (RPCBind)
    • Portmap service, which dynamically allocates ports for NFS.
  5. Ensure that the UID and GID for users accessing the NFS share match on both the Proxmox server and the NFS server.

    We can check UID/GID with this command:

    id username

    Adjust as needed or configure NFSv4 with Kerberos for identity management.

  6. Furthermore, ensure Proxmox and the NFS server use the same NFS version. Proxmox defaults to NFSv4.

    We can force NFSv3 on Proxmox:

    mount -t nfs -o vers=3 :/exported_dir /mnt/nfs

    Also, check supported NFS versions on the server:

    rpcinfo -p NFS-Server-IP

  7. Test connectivity from Proxmox to the NFS server:

    ping NFS-Server-IP

    Also, ensure the Proxmox server can see the NFS share:

    showmount -e NFS-Server-IP

  8. If Proxmox fails to mount automatically, try mounting manually:

    mount -t nfs NFS-Server-IP:/exported_dir /mnt/test_nfs

    If this fails, the issue likely lies with the NFS server configuration.

  9. To verify Proxmox NFS storage configuration, go to Datacenter > Storage. Then, add a new NFS share and provide the NFS server’s IP and the exported directory. Specify the correct NFS version if required.
  10. Finally, on the NFS server, check logs for detailed error messages:

    tail -f /var/log/syslog
    tail -f /var/log/messages

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

The “access denied” error when mounting an NFS share in Proxmox VE often results from misconfigured permissions, firewall settings, or NFS server issues. By systematically diagnosing and addressing these common causes, we can resolve the issue and restore NFS functionality.

In brief, our Support Experts demonstrated how to fix the “Access Denied” error when mounting NFS share in Proxmox VE.

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.