NFS on ipfire - no rw for linux client


I have a problem with getting the write permission for the linux client within the mounted USB-Stick (NFS-Server on ipfire device).
The windows machine getting permissions, but the linux not.

I thought about uid and gid parameters in fstab of the client, but it shows me an error if i put it there.

The thing is, that the permissions for the folder on the client for the mounting the nfs drive there has the following permissions (if NOT mounted): drwx------ 2 user user 4.0K Jun 28 20:56 /xxx/server

If i mount the device i get the following permissions: drwxr-xr-x 8 root root 16K Jan 1 1970 /xxx/server

I can write on it with my root account, but not with the user account.

This is the fstab of the client:
nfs-device-IP:/xxx/server /xxx/server nfs user,noexec,rw,nofail,sync,tcp,intr 0 0

in exports i have the following options for the client: (rw,async,subtree_check,no_root_squash)

I have tried to chown it from root to user on the client and it seems to work, but if i mount the device on it, it can be just written with root.

here is the mount -v output on the client: serverIP:/xxx/server on /xxx/server type nfs4 (rw,nosuid,nodev,noexec,relatime,sync,vers=4.2,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=xxx,local_lock=none,addr=xxx,user=user)

So do somebody know, what the point is? :slight_smile:


can you chmod 777 /xxx/server and try writing as a user?

i can chmod it that way, but i can not write on it as user

or do you mean to do it on the server? I did it on the client

i chmod 777 it also on the server, but the ls -ldh gives me “drwxr-xr-x 9 root root 16K Jun 30 09:25 /xxx/server” and i still can not write on it as user on the client

what are the permissions of the parent dir (/xxx) ?

on the client, for the mounted device: drwxr-xr-x 3 root root 4.0K Jun 28 20:30 /xxx

if i umount the device on the client, the /xxx has root (drwxr-xr-x 3 root root 4.0K Jun 28 20:30 /xxx
), the /xxx/server has user (drwx------ 2 user user 4.0K Jun 28 20:56 /xxx/server

on the client, can you chmod 777 /xxx (which is the parent dir) and test?

hmm… but its the whole mount directory for every device i ever mount

let’s not use /mnt, make some other dir, /frank, chmod 777 /frank, then mount ip:/xxx/server /frank

there is also another option, all_squash, which you can put in /etc/exports
(echo “/mnt/nfs,sync,all_squash,no_subtree_check)” > /etc/exports)

it’s crazy… i mounted it in the folder in home and chmod 777 it, but nothing happens
also tried with all_squash for this client, but nothing



This tell’s me you have not followed the wiki !

Here is a copy of my fstab: /media/server nfs rw,defaults,rsize=8192,wsize=8192 0 0 /media/video nfs rw,defaults,rsize=8192,wsize=8192 0 0 /media/picture nfs rw,defaults,rsize=8192,wsize=8192 0 0

As per the wiki, your server should be mounted at /media.

Also the wiki suggest r/wsize to 8192 !

Good luck

i just written xxx/server, without writing the real path here.
i tried it with the folder in media, i tried it with the folder in home/user
i also had the r/wsize

and i followed wiki :wink:
the problem was “sudo chmod user /media/server” and " sudo chgrp user /media/server"

  1. i think they mean chown user /media/server and 2. it just don’t give me the rw for the user.

So whats the point?

i got it back to /media, made chown user and chgrp user, made just the same fstab as you @loup001 and i can not even mount it as user.


Ok, my exports are a bit diff.

Maybe try to duplicate.


Just did so in exports for the special client-IP, i have no range there. Then restarted the nfs.
Still can not mount as user.
Just can mount as user, if I add user at fstab, but then I can not write there.

By the way, there is a mistake in the wiki. It can not be “chmod user /media/server”, but chown.

1 Like

maybe on the server side you need to have nobody:nogroup as owner of the share
(sudo chown nobody.nogroup /xxx/server) the notes I sent have that.

i don’t even have nobody:nogroup, but nobody:x (whatever it is)

followed the wiki page

on ipfire

mkdir -p /xxx/server
chmod 777 /xxx

/etc/exports contains

/etc/init.d/nfs-server restart
(if not clean, verify from gui that rpcbind addon is running)

on client

sudo mkdir -p /media/daten
sudo chown user.user /media/daten
sudo mount ipfire:/xxx/server /media/daten

touch /media/daten/testfile

hope this helps.