GNU/Linux >> Linux Esercitazione >  >> Ubuntu

Ubuntu - Come risolvere l'errore "mount.nfs:accesso negato dal server"?

Sto provando a montare una directory da un Raspberry Pi 2 (il server NFS) da un PC Ubuntu 15.10 (il client NFS). Quando provo, ottengo l'errore:

mount.nfs: access denied by server while mounting 192.168.1.135:/home/pi

Ecco cosa sto facendo.

Su Raspberry Pi 2 (server NFS)

Aggiunta questa riga a /etc/exports

/home/pi/workspace 192.168.1.*(rw,no_subtree_check,sync,root_squash)

Rilasciato:

sudo update-rc.d rpcbind enable && sudo update-rc.d nfs-common enable

E poi ha avviato il server NFS:

[email protected] ~ $ sudo service nfs-kernel-server start
[ ok ] Exporting directories for NFS kernel daemon....
[ ok ] Starting NFS kernel daemon: nfsd mountd.

Su PC (client NFS)

> showmount -e 192.168.1.135
Export list for 192.168.1.135:
/home/pi/workspace 192.168.1.*

Quindi provo a montare la directory e ottengo l'errore:

> sudo mount 192.168.1.135:/home/pi/workspace /home/fanta/nfs
mount.nfs: access denied by server while mounting 192.168.1.135:/home/pi/workspace

Qualche informazione che posso raccogliere per risolvere il problema?

Raspberry Pi 2 esegue Linux dex 4.1.13-v7+ e il PC Ubuntu 15.10 a 64 bit.

Grazie!

Risposta accettata:

Puoi usare * solo da solo o nei nomi di dominio. Sostituiscilo con ip/numberofbits:

/home/pi/workspace 192.168.1.0/24(rw,no_subtree_check,sync,root_squash)

Vedi man exports o debian handbook

Ogni macchina può essere identificata dal suo nome DNS o dal suo indirizzo IP. È inoltre possibile specificare interi set di macchine utilizzando una sintassi come *.falcot.com o un intervallo di indirizzi IP come 192.168.0.0/255.255.255.0 o 192.168.0.0/24.


Ubuntu
  1. Come accedere ai file di Ubuntu 11.04 in Windows 7??

  2. Come installare Unison 2.40 su Ubuntu 16.04 Xenial (per risolvere "errore irreversibile:intestazione inaspettata ricevuta")?

  3. Come modificare l'URL di accesso di Phpmyadmin?

  4. Come correggere l'errore di autorizzazione Docker negata su Ubuntu

  5. “mount.nfs:accesso negato dal server durante il montaggio” – come risolvere

Come installare DaVinci Resolve su Ubuntu

Come correggere l'errore Busybox Initramfs su Ubuntu

Come accedere a Google Drive su Ubuntu

Come configurare la condivisione NFS su Ubuntu 20.04, 18.04

Come risolvere l'errore di montaggio del disco in Ubuntu

Come installare il server NFS su Ubuntu 20.04 LTS