Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    NFS mount problems

    General pfSense Questions
    3
    13
    7.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vukomir
      last edited by

      Hi,

      I am trying to mount a nfs to my pfsense for a kickstart linux server.
      i enabled nfs client in rc.conf, but when i tray mount the nfs export to pfsens i get the flowing error.

      [2.0-RELEASE][admin@home]/root(2): mount 172.16.10.3:/volume1/web/ /mnt/
      [tcp] 172.16.10.3:/volume1/web: Permission denied

      dose anyone know what the problem can be?

      Thanks.

      Br,
      Vukomir

      1 Reply Last reply Reply Quote 0
      • P
        podilarius
        last edited by

        It is most likely your export options.

        1 Reply Last reply Reply Quote 0
        • V
          vukomir
          last edited by

          Hi,

          i mounted the export on a linux system with no problems, only on pfsense i am heaving problems mounting it.

          Br,
          Vukomir

          1 Reply Last reply Reply Quote 0
          • P
            podilarius
            last edited by

            try creating a subfolder in mnt to make sure mnt is ready for a mount. Are you running embedded pfsense? what are the export options on the server? I just tested a mount and it worked without any problems.

            1 Reply Last reply Reply Quote 0
            • V
              vukomir
              last edited by

              [2.0-RELEASE][admin@gw.home.vukomir.info]/mnt(9): mkdir vmax
              [2.0-RELEASE][admin@gw.home.vukomir.info]/mnt(10): mount 172.16.10.3:/volume1/web /mnt/vmax/
              [tcp] 172.16.10.3:/volume1/web: Permission denied

              VMAX /root > cat /etc/exports
              /volume1/web    172.16.10.*(ro,sync,no_wdelay,root_squash,anonuid=65534,anongid=65534)

              Current version: 2.0-RELEASE
                NanoBSD Size : 2g

              FreeBSD gw.home.vukomir.info 8.1-RELEASE-p4 FreeBSD 8.1-RELEASE-p4 #0: Tue Sep 13 18:02:33 EDT 2011    root@FreeBSD_8.0_pfSense_2.0-snaps.pfsense.org:/usr/obj./usr/pfSensesrc/src/sys/pfSense_wrap.8.i386  i386

              1 Reply Last reply Reply Quote 0
              • P
                podilarius
                last edited by

                of course it will be denied, you have root_squash option turned on and you are trying to mount it from root user on pfsense. Like I said, it is most likely an export option that is causing the problem.

                Edit:
                There is also a problem if you changed user to admin since admin will not have permission to mount.

                1 Reply Last reply Reply Quote 0
                • A
                  azmike
                  last edited by

                  @vukomir:

                  VMAX /root > cat /etc/exports
                  /volume1/web    172.16.10.*(ro,sync,no_wdelay,root_squash,anonuid=65534,anongid=65534)

                  I believe this is the problem.  Wildcards (* and ?) are allowed in host names but not IP networks.
                  I would try:

                  /volume1/web    172.16.10.0/24(ro,sync,no_wdelay,root_squash,anonuid=65534,anongid=65534)

                  1 Reply Last reply Reply Quote 0
                  • P
                    podilarius
                    last edited by

                    In Linux, I think it is a bit more relaxed and they are allowed. That said, CIDR notation is much better if you are going to use an IP.

                    1 Reply Last reply Reply Quote 0
                    • V
                      vukomir
                      last edited by

                      Hi,

                      so.. i tried to put switch the wildcard with the ip and the fqdn of the pfsende the same.

                      below is the configuration of the rc.conf located in /etc/defaults

                      [2.0-RELEASE][admin@gw.home.vukomir.info]/root(1): grep nfs /etc/defaults/rc.conf
                      netfs_types="nfs:NFS nfs4:NFS4 smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems.
                      nfs_client_enable="YES"        # This host is an NFS client (or NO).
                      nfs_access_cache="60"          # Client cache timeout in seconds
                      nfs_server_enable="YES"        # This host is an NFS server (or NO).
                      nfs_server_flags="-u -t -n 4"  # Flags to nfsd (if enabled).
                      nfs_reserved_port_only="NO"    # Provide NFS only on secure port (or NO).
                      nfs_bufpackets=""              # bufspace (in packets) for client
                      nfsv4_server_enable="YES"      # Enable support for NFSv4
                      nfscbd_enable="YES"            # NFSv4 client side callback daemon
                      nfscbd_flags=""                # Flags for nfscbd
                      nfsuserd_enable="NO"            # NFSv4 user/group name mapping daemon
                      nfsuserd_flags=""              # Flags for nfsuserd

                      maybe i have missed something in the conf file.

                      i do not see any error in dmesg.

                      thanks.

                      1 Reply Last reply Reply Quote 0
                      • P
                        podilarius
                        last edited by

                        That is all fine and good, but in exportfs you have root_squash so only users with mount access can mount the remote location. In pfSense's case, admin does not seem to have mount access and if you login as root, the NFS server will not allow the connection because it is root trying to mount. A catch 22. So, I think you need to change the exportfs to no_root_squash or find some way to allow the admin user in pfsense to mount.

                        1 Reply Last reply Reply Quote 0
                        • V
                          vukomir
                          last edited by

                          apparently the did not solved the problem.  :'(

                          i created a new file /etc/rc.conf and added the nfs info, but i can not reboot the router not.

                          i will wait until tomorrow to test this. :D

                          if you have any new ideas please do not estate :D

                          Thanks.

                          Br,
                          Vukomir

                          1 Reply Last reply Reply Quote 0
                          • P
                            podilarius
                            last edited by

                            Did you change the export options on the NFS server?

                            1 Reply Last reply Reply Quote 0
                            • V
                              vukomir
                              last edited by

                              Hi podilarius,

                              I have change the exports options on the nfs server.

                              Br,
                              Vukomir

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.