NFSv3 in Gutsy maps uids wrongly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: linux-generic
Mounting an NFS share from a FC2 server:
/home 10.0.156.
10.0.156.32 (client) is edgy (2.6.17-12-generic) and appears to work. /etc/fstab has:
server:/home /home nfs rw,soft,intr 0 0
This machine can access NFS home dirs just fine. It appears to be using NFSv3, from nfsstat.
10.0.156.33 (client) is gutsy (2.6.22-14-generic) and NFSv3 appears to be broken. Cannot write to any files except in world-writable directories, and the uid/gid is set to -2 always, like all_squash was in effect, but this is done by the _client_.
pcap from edgy (attached):
15:53:52.761340 IP (tos 0x0, ttl 64, id 61342, offset 0, flags [DF], proto TCP (6), length 240) 10.0.156.
pcap from gutsy (attached):
15:51:58.818008 IP (tos 0x0, ttl 64, id 63870, offset 0, flags [DF], proto TCP (6), length 324) 10.0.156.210.nfs > 10.0.156.
In both cases it's creating a file in a world-writable directory. Gutsy uses the wrong permissions.
Forcing gutsy to use nfsv2 by mounting with nfsvers=2 option appears to work around the problem.
This may be a security issue because users can create files with uids/gids other than their own the nobody uid/gid).
I can try an alternative kernel but please post a direct HTTP link to download it.
I also have problems mounting rw using NFS3, Gutsy client mounting from CentOS 5 NFS server.
fstab:
scaleo:/filer/temp /mnt/scaleo/temp nfs rw 0 0
sudo mount -a, check /etc/mtab:
scaleo:/filer/temp /mnt/scaleo/temp nfs rw,addr=<IP manually removed> 0 0
Can't write to /mnt/scaleo/temp, try checking with nfsstat -m: 3,rsize= 32768,wsize= 32768,hard, proto=tcp, timeo=600, retrans= 2,sec=sys, addr=scaleo
/mnt/scaleo/temp from scaleo:/filer/temp
Flags: ro,vers=
Note "Flags: ro", according to mtab it's rw.
Tried the exact same setup from a CentOS client and it worked.
Added nfsvers=2 to fstab:
scaleo:/filer/temp /mnt/scaleo/temp nfs rw,nfsvers=2 0 0
Remounted, check mtab: 2,addr= <IP manually removed> 0 0
scaleo:/filer/temp /mnt/scaleo/temp nfs rw,nfsvers=
And nfsstat -m: 2,rsize= 8192,wsize= 8192,hard, proto=tcp, timeo=600, retrans= 2,sec=sys, addr=scaleo
/mnt/scaleo/temp from scaleo:/filer/temp
Flags: rw,vers=
Hey, now it's rw. Verified that I can write to the share, works.
Looks like there is a problem with NFSv3 in the Gutsy NFS client. Tried manually mounting (skipping fstab), same result.