FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

LinkBack Thread Tools
Old 03-09-2011, 12:59 PM
Rik Theys
Default Bug#617508: linux-image-2.6.32-5-amd64: File permissions wrong on NFS4 mounts, but OK after explicit stat

Package: linux-2.6
Version: 2.6.32-30
Severity: normal


We initially experied this bug on a RHEL6 server and CentOS 5.5 clients.
See also my Red Hat bugzilla report:

I can reproduce this with:
- Debian Lenny clients against the RHEL6 server
- Debian Squeeze clients against the RHEL6 server
- RHEL 5.5 and 5.6 clients against the RHEL6 server
- all these clients against a squeeze server
- all these clients against a squeeze server running 2.6.38-rc6-amd64

We basically have a ksh script that appends a line to a world-writable
file. This world-writable
file lives on an (automounted, but this doesn't seem to be relevant)
NFSv4 mount.
Very frequently this script fails with the error that it has no
permissions to create the file.

Rerunning the script triggers the same error condition. When we run a
stat against the
world-writable file and then rerun the script, the script works and
appends the line.

After waiting a while, the same error appears when running the script.
Executing a

stat (or ls -l ) always "fixes" it for a while.

To reproduce I've set up the test server like this:

mkdir -p /srv/temp /srv/export /srv/export/freeware
dd if=/dev/zero of=/srv/test.ext4 bs=1M count=256
mkfs.ext4 /srv/test.ext4
mount -t ext4 -o
loop,relatime,nosuid,nodev,acl,jqfmt=vfsv0,usrjquo ta=aquota.user,grpjquota=aquota.group
/srv/test.ext4 /srv/temp

quotacheck -vug /srv/temp
quotaon -vug /srv/temp
mount -t none -o bind /srv/temp /srv/export/freeware
mkdir -p /srv/temp/bin/linux-x86_64/
touch /srv/temp/bin/linux-x86_64/accountlog
chmod 666 /srv/temp/bin/linux-x86_64/accountlog
chown -Rh gcc:freeware /srv/temp/bin (this is a normal user and group)

/etc/exports has the following lines:
/srv/export *(rw,async,no_subtree_check,fsid=0)
/srv/export/freeware *(rw,async,no_subtree_check)

/etc/default/nfs-kernel-server has:
RPCMOUNTDOPTS=--manage-gids -p 892 --no-nfs-version 1 --no-nfs-version 2
--no-nfs-version 3

/etc/idmapd.conf is configured with the same domain as the client.

service nfs-kernel-server restart

On the client:
mount -t nfs4 -o nodev,nosuid,intr server:/freeware/bin /test

run the following ksh script on the client:

#! /bin/ksh -p
printf "%s %s %s %s %s %s
" ${HOSTNAME:-$(hostname)}
${USER:-$(whoami)} $version ${0##*/} $(date +'%d/%m/%y%t%T') >>

Very frequently we get an error stating that the file can not be created.
Running a stat or ls -l on the file will show the correct permissions
and owner/group. After
running the stat, the script will work OK. After a while, the error will

I'm not sure this is an NFSv4 client or server bug.

I also tried it with linux-image-2.6.38-rc6-amd64,
2.6.38~rc6-1~experimental.1 on the server but no change.



To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4D7787B8.8010105@esat.kuleuven.be">http://lists.debian.org/4D7787B8.8010105@esat.kuleuven.be

Thread Tools

All times are GMT. The time now is 03:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org