LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-04-2020, 05:33 PM   #1
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
NFS mounting give permission denied


I'm in the process of setting up an NFS server on my network. I've installed the software on both the server and client, configured /etc/exports and /etc/hosts, and cannot mount the share on the client. I've read almost every hit DuckDuckGo returned, and still can't figure out what the problem is. I'm probably overlooking something simple, but perhapes I can't see the forest for the trees. On the server:
Code:
~$ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#		to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/media/stan/USB3_HDD			NUC(rw,sync,no_subtree_check)
Code:
~$ sudo systemctl restart  nfs-kernel-server
~$ sudo systemctl status nfs-kernel-server
● nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
   Active: active (exited) since Fri 2020-09-04 16:43:12 CDT; 4s ago
  Process: 28196 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
  Process: 28197 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
 Main PID: 28197 (code=exited, status=0/SUCCESS)

Sep 04 16:43:11 chromebox systemd[1]: Starting NFS server and services...
Sep 04 16:43:12 chromebox systemd[1]: Started NFS server and services.
~$ sudo showmount --help
Usage: showmount [-adehv]
       [--all] [--directories] [--exports]
       [--no-headers] [--help] [--version] [host]
~$ sudo showmount --exports
Export list for chromebox:
/media/stan/USB3_HDD NUC.attlocal.net
On the client:
Code:
stan@NUC:~$ sudo mount -t nfs4 -v 192.168.1.221:/media/stan/USB3_HDD /mnt/share
mount.nfs4: timeout set for Fri Sep  4 16:49:36 2020
mount.nfs4: trying text-based options 'vers=4.2,addr=192.168.1.221,clientaddr=192.168.1.121'
mount.nfs4: mount(2): Permission denied
mount.nfs4: access denied by server while mounting 192.168.1.221:/media/stan/USB3_HDD
stan@NUC:~$ sudo mount -t nfs4 -v chromebox:/media/stan/USB3_HDD /mnt/share
mount.nfs4: timeout set for Fri Sep  4 16:51:30 2020
mount.nfs4: trying text-based options 'vers=4.2,addr=192.168.1.221,clientaddr=192.168.1.121'
mount.nfs4: mount(2): Permission denied
mount.nfs4: access denied by server while mounting chromebox:/media/stan/USB3_HDD
stan@NUC:~$ sudo showmount chromebox -e
Export list for chromebox:
/media/stan NUC.attlocal.net
Server permissions:
Code:
~$ ls -la /media/stan
total 12
drwxr-x---+  3 root   root    4096 Sep  4 17:37 .
drwxr-xr-x   5 root   root    4096 Aug 29 14:24 ..
drwxrwxrwx  45 nobody nogroup 4096 Aug 29 14:08 USB3_HDD

What am I missing?

Last edited by sgosnell; 09-04-2020 at 05:43 PM. Reason: mre info
 
Old 09-05-2020, 12:23 AM   #2
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Original Poster
Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Well, I got it working by using version 3 of nfs. I didn't think Buster would use that, but it apparently does.
Code:
sudo mount -t nfs -o nfsvers=3 chromebox:/media/stan/USB3_HDD /mnt/share
This works, and in fstab
Code:
192.168.1.221:/media/USB3_HDD	/media/stan/USB3_HDD	nfs	defaults,user,exec,vers=3,noauto,nofail
works.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount NFS error - mount.nfs: mount(2): Permission denied ndtatlive SUSE / openSUSE 1 09-20-2018 10:46 PM
mount.nfs: access denied by server while mounting (null) when mounting nfs shares into each other. weylyn1 Linux - General 5 12-06-2017 12:24 PM
NFS mounting : Permission denied Bahador Linux - Networking 3 07-18-2003 04:33 AM
NFS Problem mounting 2 systems:Permission Denied by server meng_en Linux - General 3 09-23-2002 11:24 PM
permission denied when mounting nfs directory keirobyn Linux - Networking 3 01-29-2002 12:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration