Bug 3508

Summary: utime() not implemented over nfs if not file owner
Product: [Retired] Red Hat Linux Reporter: stewart
Component: nfs-utilsAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: mordibity, support
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-01 14:15:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description stewart 1999-06-16 18:55:44 UTC
Ideally a solution for RH 5.2 (with a 2.0.X kernel) is
sought as well...

I've tried this on RH 5.2 systems with kernel 2.0.35 and
2.2.9 (with nfsd patch from knfsd 1.3).  As well as on stock
RH 6.0, or with kernel 2.2.9 (nfsd patch from knfsd 1.3) and
2.2.10-ac1.  Using knfsd 1.3 and 1.4.

It appears that the utime() function is not implemented
properly over nfs.  If I do not own a file on an nfs mounted
partition, but I do have write access to it
	utime ("nfs/filename", NULL);
does not work.  It does work if not on an nfs mounted
partition.

Here is an example on the nfs mounted partition:
        [stewart@soleil stewart]$ whoami
        stewart
        [stewart@soleil stewart]$ groups
        eng users mirrors doc

        [stewart@soleil stewart]$ df .
        Filesystem           1k-blocks      Used Available
Use% Mounted on
        soleil:/mnt            2919936   1858648    910292
67% /t
        [stewart@soleil stewart]$ ls -al
        total 2
        drwxrwxr-x   2 root     eng          1024 Jun 15
17:26 ./
        drwxr-xr-x   6 root     root         1024 Jun 15
16:19 ../
        -rw-rw-rw-   1 root     eng             0 Jun 16
10:31 ll
        [stewart@soleil stewart]$ touch ll
        touch: ll: Operation not permitted
        [stewart@soleil stewart]$ vi ll
        [stewart@soleil stewart]$ ls -la
        total 3
        drwxrwxr-x   2 root     eng          1024 Jun 16
10:52 ./
        drwxr-xr-x   6 root     root         1024 Jun 15
16:19 ../
        -rw-rw-rw-   1 root     e
Notice touch fails, but I can write to the file...  strace
of touch shows
a problem with utime()
        [stewart@soleil stewart]$ strace touch ll
        [...]
personality(PER_LINUX)                  = 0
getpid()                                = 1082
brk(0)                                  = 0x804d40c
brk(0x804d444)                          = 0x804d444
brk(0x804e000)                          = 0x804e000
stat("ll", {st_mode=0, st_size=0, ...}) = 0
utime("ll", NULL)                       = -1 EPERM
(Operation not
permitted)
write(2, "touch: ", 7touch: )                  = 7
write(2, "ll", 2ll)                       = 2
write(2, ": Operation not permitted", 25: Operation not
permitted) = 25
write(2, "\n", 1
)                       = 1
_exit(1)                                = ?
ng             4 Jun 16 10:54 ll
        [stewart@soleil stewart]$

Now on the real mount point (not over nfs):
        [stewart@soleil stewart]$ cd /mnt/stewart/
        [stewart@soleil stewart]$ df .
        Filesystem           1k-blocks      Used Available
Use% Mounted on
        /dev/hda1              2919936   1858649    910291
67% /
        [stewart@soleil stewart]$ ls -al
        total 3
        drwxrwxr-x   2 root     eng          1024 Jun 16
10:54 ./
        drwxr-xr-x   6 root     root         1024 Jun 15
16:19 ../
        -rw-rw-rw-   1 root     eng             4 Jun 16
10:54 ll
        [stewart@soleil stewart]$ touch ll
[stewart@soleil stewart]$

Any ideas why utime() fails over nfs?

Comment 1 Cristian Gafton 2000-08-09 02:34:19 UTC
assigned to johnsonm

Comment 2 Patrick C. F. Ernzer 2001-04-11 13:52:13 UTC
Is this still an issue or has it been fixed?

Comment 3 Pallas tech support 2001-04-11 14:39:03 UTC
Hi,

it's still an issue.

Cheers

-- Mario

Comment 4 Michael K. Johnson 2001-05-01 14:15:35 UTC
Bob, you know more about NFS than I do, I think.

Comment 5 Bob Matthews 2001-05-01 15:21:29 UTC
This is fixed in (at least) the 2.4.2 kernel.  Sorry, don't know of any patches
for 2.2 and earlier kernels.

Comment 6 Pallas tech support 2001-05-04 08:42:42 UTC
as we have just purchased received and installed the latest and greatest alpha 
product box (which tells kernel 2.2.16), please point me to all specific 
packages and places required to be downloaded and installed to fix this error. 
thanks, support

Comment 7 Bob Matthews 2001-05-04 14:33:01 UTC
This is fixed in the current Alpha Rawhide release.