CentOS Bug Tracker
CentOS Website

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002583 [CentOS-5] kernel minor always 2008-01-04 16:30 2008-02-01 19:57
Reporter dang View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 5.0 - x86_64
Summary 0002583: NFS CREATE fails on hp-ux clients with kernel 2.6.18-53.1.4.el5
Description HP-UX NFS clients fail creating a new file on a CentOS 5 NFS server updated with the 2.6.18-53.1.4.el5.

Example:

hp-ux$ cp anyfile /to/nfs/fs/on/centos5
hp-ux$ cp: cannot create anyfile: Permission denied
Additional Information A tcpdump trace viewed with wireshark seems to indicate that the NFS CREATE call is made with Mode: UNCHECKED and with the initial file permission mode set to 00 on HP-UX clients. The NFS CREATE call returns a NFS3ERR_ACCES error, probably due to the initial permission mode set to 00 (none). This was not a problem on the base level CentOS 5 kernel.

tcpdump trace file attaced.
Tags No tags attached.
Attached Files ? file icon centos5-hpux.tcpdump [^] (3,212 bytes) 2008-01-04 16:30
? file icon bmc-nfsd_setattr.patch [^] (519 bytes) 2008-01-21 19:48

- Relationships

-  Notes
(0006671)
dang (reporter)
2008-01-08 17:02

I have just discovered that this only happens when the backing filesystem is gfs. When using ext3 the HP-UX NFS clients work OK.
(0006734)
dang (reporter)
2008-01-21 19:47

Problem appears to be due to generic_permission returning -EACCES

I traced down the function that is returning the -EACCES error;

nfsd_proc_create
 nfsd_create_v3
  vfs_create - Note: the create returns OK
 nfsd_setattr
  notify_change
   generic_permission - Note: returns a -EACCES error!

 Apparently GFS is the only filesystem I tested calling this generic_permission. ext3 and XFS both do not call generic_permission and therefore do not fail. The file that is created from the HP-UX NFS client is set to mode=0 and with the correct owner calling vfs_create. Then, nfsd tries to set the attributes with nfsd_setattr but generic_permission returns -EACCES!

 I did not want to change generic_permission as I do not have the understanding of the kernel to feel comfortable changing a kernel function. I made a patch to change how nfsd reacts to the return code. I simply look for a return from notify_change of -EACCES and if the FSUID=InodeUID then ignore the error. The HP-UX NFS client now works.

 I will attach my simple patch file so that someone with more knowledge can look at this and provide a permanent fix for a future update.
(0006798)
dang (reporter)
2008-02-01 19:57

Logged this same issue with the upstream bugzilla: #431253

- Issue History
Date Modified Username Field Change
2008-01-04 16:30 dang New Issue
2008-01-04 16:30 dang Assigned To => kbsingh@karan.org
2008-01-04 16:30 dang File Added: centos5-hpux.tcpdump
2008-01-08 17:02 dang Note Added: 0006671
2008-01-21 19:47 dang Note Added: 0006734
2008-01-21 19:48 dang File Added: bmc-nfsd_setattr.patch
2008-02-01 19:57 dang Note Added: 0006798
2008-02-01 21:27 herrold Issue Monitored: herrold


Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker