Access Denied by Server

    • OMV 3.x
    • Resolved
    • Access Denied by Server

      I am absolutely banging my head on the keyboard and feeling like a complete noob trying to make nfs work for me.

      I am trying to share an NFS folder from OMV3 and connect to it from a Debian 8 LXC and am getting "mount.nfs: access denied by server while mounting ..."

      Some background; single server running Proxmox, OMV3 installed in Debian 8 VM (host), Debian 8 LXC (client) running app that needs access to NFS share. While logged into client (Debian8LXC) as root, I have tried to mount the nfs share using any of three below methods and am not able to gain access;
      • mount host:/folder /folder
      • mount host:/export/folder /folder
      • mount -o nfsvers=3 host:/export/folder /folder

      I am at a complete loss, any help is greatly appreciated. Please let me know what files/details I need to post.

      I have tried to open up the NFS share as much as possible by adding more and more options;

      # This configuration file is auto-generated.
      # WARNING: Do not edit this file, your changes will be lost.
      # /etc/exports: the access control list for filesystems which may be exported
      # to NFS clients. See exports(5).
      /export/folder xx.xx.xx.xx/24(fsid=1,rw,sync,no_subtree_check,no_root_squash,insecure,all_squash,anongid=100)
      # NFSv4 - pseudo filesystem root
      /export xx.xx.xx.xx/24(ro,fsid=0,root_squash,no_subtree_check,hide

      I have also tried giving the "/export/folder/" 777 nobody:nogroup permissions.

      And yes, I installed nfs-common in the LXC.

      I have also tried to mount the NFS share from my MacBookPro, UID/GID matching to host, and get Permission denied.
    • subzero79 wrote:

      Just check the syslog in Omv server when you attempt to mount from the client. Should have also an error. Also for now just delete the subnet restriction.
      Thanks, I should have mentioned that too, I had tried without the subnet also with same results. Checking syslog does not show any attempt to connect/reject a user. However, turning off and on the NFS services does show numerous errors.

      Anyhow, I am giving up as now my SMB/CIFS services are now hosed too. I no longer have access to those shares from any computer or with any user accounts. I tried removing and re-adding shares to no avail. I also tried removing and adding users, I'm just not able to connect to any shares.

      I guess my OMV installation is hosed.
    • subzero79 wrote:

      This has to do with lxc by itself with security constraints. I also use proxmox and i get the same output. You can mount in host node and use bind mount or relax the lxc settings.
      Thank you for that info, I looked into Proxmox docs and LXCs details and found those security details as you mentioned.

      I have been consolidating my numerous individual servers into a single VM server (Proxmox) and so have been learning alot along the way, just like this issue.
    • Just in case anyone else finds themselves in the same situation, I'd like to post the solution for getting this to work. And as mentioned by subzero79, this is related to running on Proxmox VM server.

      link to solution details

      While SSH'd into the local PVE node;
      First step is to mount the nfs share on the local PVE node; mount ip_nfs_server:/nfs_share /mnt/local_folder
      Second is to then bind the mount point to the LXC; pct set CONTAINER_ID -mpX /mnt/local_folder,mp=/path/inside/the/container

      Enjoy :)