I can reproduce this failure on natty/oneiric just fine.
I then applied the upstream patch (a043226bc140a2c1dde162246d68a67e5043e6b2), that was identified in the public bug and upstream bug.
After doing this I installed the tools on my laptop:
apt-get install nfs-common nfs-kernel-server
Then I setup of /etc/exports as described in the bug to a directory on my laptop (ext4).
/path/to/dir *(rw,sync,fsid=0,no_subtree_check)
I then had to insert the module and restart the server:
sudo modprobe nfs
sudo service nfs-kernel-server restart
I mounted the directory:
sudo mount -t nfs4 -o proto=tcp,port=2049 localhost:/ /mnt
I created a similar c program and compiled. I put this into the shared folder.
I could run it with normal permissions.
I then did 'chmod 111 ./a.out' and then I could not run the program (Permission denied) if I was doing it via the /mnt directory.
arges@arges-virtual-machine:/mnt$ ls -la
total 24
drwxr-xr-x 2 4294967294 4294967294 4096 2011-11-17 10:12 .
drwxr-xr-x 22 root root 4096 2011-11-17 09:57 ..
---x--x--x 1 4294967294 4294967294 8425 2011-11-17 10:12 a.out
-rw-r--r-- 1 4294967294 4294967294 73 2011-11-17 10:12 hello.c
arges@arges-virtual-machine:/mnt$ ./a.out
-bash: ./a.out: Permission denied
arges@arges-virtual-machine:/mnt$ mount -v
/dev/vda1 on / type ext4 (rw,errors=remount-ro,commit=0)
<snip>
nfsd on /proc/fs/nfsd type nfsd (rw)
localhost:/ on /mnt type nfs (rw,vers=4,addr=127.0.0.1,clientaddr=127.0.0.1)
I could run it if I wasn't running it over the nfsv4 share (sanity check):
I can reproduce this failure on natty/oneiric just fine.
I then applied the upstream patch (a043226bc140a2 c1dde162246d68a 67e5043e6b2) , that was identified in the public bug and upstream bug.
After doing this I installed the tools on my laptop:
apt-get install nfs-common nfs-kernel-server
Then I setup of /etc/exports as described in the bug to a directory on my laptop (ext4). fsid=0, no_subtree_ check)
/path/to/dir *(rw,sync,
I then had to insert the module and restart the server:
sudo modprobe nfs
sudo service nfs-kernel-server restart
I mounted the directory:
sudo mount -t nfs4 -o proto=tcp,port=2049 localhost:/ /mnt
I created a similar c program and compiled. I put this into the shared folder.
I could run it with normal permissions.
I then did 'chmod 111 ./a.out' and then I could not run the program (Permission denied) if I was doing it via the /mnt directory.
arges@arges- virtual- machine: /mnt$ ls -la virtual- machine: /mnt$ ./a.out virtual- machine: /mnt$ mount -v remount- ro,commit= 0) 4,addr= 127.0.0. 1,clientaddr= 127.0.0. 1)
total 24
drwxr-xr-x 2 4294967294 4294967294 4096 2011-11-17 10:12 .
drwxr-xr-x 22 root root 4096 2011-11-17 09:57 ..
---x--x--x 1 4294967294 4294967294 8425 2011-11-17 10:12 a.out
-rw-r--r-- 1 4294967294 4294967294 73 2011-11-17 10:12 hello.c
arges@arges-
-bash: ./a.out: Permission denied
arges@arges-
/dev/vda1 on / type ext4 (rw,errors=
<snip>
nfsd on /proc/fs/nfsd type nfsd (rw)
localhost:/ on /mnt type nfs (rw,vers=
I could run it if I wasn't running it over the nfsv4 share (sanity check):
arges@arges- virtual- machine: /mnt$ cd ~/Test/ virtual- machine: ~/Test$ ls -la virtual- machine: ~/Test$ ./a.out
arges@arges-
total 24
drwxr-xr-x 2 arges arges 4096 2011-11-17 10:12 .
drwxr-xr-x 22 arges arges 4096 2011-11-17 10:10 ..
---x--x--x 1 arges arges 8425 2011-11-17 10:12 a.out
-rw-r--r-- 1 arges arges 73 2011-11-17 10:12 hello.c
arges@arges-
hello binary