You are not logged in.

#1 2016-03-10 19:39:26

dretech
Member
Registered: 2016-02-08
Posts: 7

NFS: Root permission denied with no_root_squash option

Hello,

On my NFS server the contents of /etc/exports is:
/nfs/ 192.168.2.0/24(rw,fsid=root,no_subtree_check)
/nfs/lxc/webi 192.168.2.0/24(rw,no_root_squash,no_subtree_check)
/nfs/test 192.168.2.0/24(rw,no_root_squash,no_subtree_check)

After making the /etc/exports file I ran the command: exportfs -arv

On the client mount to the NFS server is:
nucserver://lxc/webi on /srv/http type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=14,retrans=2,sec=sys,clientaddr=192.168.2.82,local_lock=none,addr=192.168.2.80)

Both client and server are running nfs-utils 1.3.3-3 for Arch Linux.

My problem is: On the client as root user I am unable to write files in the mounted nfs directory.

When I give write permissions for other (chmod o+w) the root user is able to write in the nfs directory. When I (as root user) create a file, the owner has user ID 65534. Preferably I do not want to give write permissions for others.

Can anybody tell me what is wrong with my config for NFS? (Of is it a bug in the current NFS of Arch Linux?)

Thank you in advance,

Dretech

Offline

#2 2016-03-11 21:12:28

Painless
Member
Registered: 2006-02-06
Posts: 233

Re: NFS: Root permission denied with no_root_squash option

Please try adding no_root_squash to your NFS root, and remove the trailing slash, e.g.

/nfs 192.168.2.0/24(rw,fsid=root,no_root_squash,no_subtree_check)

Offline

#3 2016-03-12 07:24:25

dretech
Member
Registered: 2016-02-08
Posts: 7

Re: NFS: Root permission denied with no_root_squash option

Thank you! It is the solution for my problem!

Offline

Board footer

Powered by FluxBB