ex/vi and Secure NFS?

From: Peter Eriksson (peter_at_ifm.liu.se)
Date: 06/08/05


Date: Wed, 8 Jun 2005 14:30:10 +0000 (UTC)

Any ideas what might be the cause of this strange problem?

Client (where I'm giving these commands) is running IRIX 6.5.27
Server is a Sun running Solaris 9

The directory is mounted using Secure NFS (Kerberos):

home:/export/staff/peter on /home/peter type nfs (vers=3,nosuid,nodev,noquota,sec=krb5,proto=tcp,dev=140006)

% cat >test.txt
hello
% cat test.txt
hello
% rm test.txt
% ex test.txt
"test.txt" [New file]
:a
hello
.
:w
"test.txt" [New file] Permission denied [Warning - test.txt is incomplete]
:q!
% ls -l test.txt
-rw-r--r-- 1 peter nuucp 0 Jun 8 16:07 test.txt

Any ideas as to why ex is failing? When I snoop on the network traffic
to the NFS server I do see an authentication failure:

The successful transaction looks like this "on the wire":

RPC: ----- SUN RPC Header -----
RPC:
RPC: Record Mark: last fragment, length = 168
RPC: Transaction id = 776075542
RPC: Type = 0 (Call)
RPC: RPC version = 2
RPC: Program = 100003 (NFS), version = 3, procedure = 7
RPC: Credentials: Flavor = 6 (RPCSEC_GSS), len = 24 bytes
RPC: version = 1
RPC: gss control procedure = 0 (RPCSEC_GSS_DATA)
RPC: sequence num = 178
RPC: service = 1 (none)
RPC: handle: length = 4, data = [00000011]
RPC: Verifier : Flavor = 6 (RPCSEC_GSS), len = 37 bytes
RPC: [602306092A864886F71201020201010000FFFFFFFFB09385EE426595880D7A496ABF09E99E]
RPC:
NFS: ----- Sun NFS -----
NFS:
NFS: Proc = 7 (Write to file)
NFS: File handle = [D2CC]
NFS: 0154002000000002000A000000001AE83632494A000A0000000000027D7FCB57
NFS: Offset = 0
NFS: Size = 6
NFS: Stable = FSYNC
NFS:

RPC: ----- SUN RPC Header -----
RPC:
RPC: Record Mark: last fragment, length = 200
RPC: Transaction id = 776075542
RPC: Type = 1 (Reply)
RPC: This is a reply to frame 14
RPC: Status = 0 (Accepted)
RPC: Verifier : Flavor = 6 (RPCSEC_GSS), len = 37 bytes
RPC: [602306092A864886F71201020201010000FFFFFFFFCE5F2B48B5A4802F745D78F0FBB7DE70]
RPC: Accept status = 0 (Success)
RPC:
NFS: ----- Sun NFS -----
NFS:
NFS: Proc = 7 (Write to file)
NFS: Status = 0 (OK)
NFS: Pre-operation attributes:
NFS: Size = 0 bytes
NFS: Modification time = 08-Jun-05 14:14:06.690037000 GMT
NFS: Attribute change time = 08-Jun-05 14:14:06.690037000 GMT
NFS:
NFS: Post-operation attributes:
NFS: File type = 1 (Regular File)
NFS: Mode = 0644
NFS: Setuid = 0, Setgid = 0, Sticky = 0
NFS: Owner's permissions = rw-
NFS: Group's permissions = r--
NFS: Other's permissions = r--
NFS: Link count = 1, User ID = 103, Group ID = 10
NFS: File size = 6, Used = 1024
NFS: Special: Major = 0, Minor = 0
NFS: File system id = 365072220192, File id = 6888
NFS: Last access time = 08-Jun-05 14:07:16.259030000 GMT
NFS: Modification time = 08-Jun-05 14:14:08.231643000 GMT
NFS: Attribute change time = 08-Jun-05 14:14:08.231643000 GMT
NFS:
NFS: Count = 6 bytes written
NFS: Stable = FSYNC
NFS: Verifier = 8358BE19429ABC3F
NFS:

The failed one looks like:

RPC: ----- SUN RPC Header -----
RPC:
RPC: Record Mark: last fragment, length = 172
RPC: Transaction id = 776075556
RPC: Type = 0 (Call)
RPC: RPC version = 2
RPC: Program = 100003 (NFS), version = 3, procedure = 7
RPC: Credentials: Flavor = 6 (RPCSEC_GSS), len = 24 bytes
RPC: version = 1
RPC: gss control procedure = 0 (RPCSEC_GSS_DATA)
RPC: sequence num = 35
RPC: service = 1 (none)
RPC: handle: length = 4, data = [00000010]
RPC: Verifier : Flavor = 6 (RPCSEC_GSS), len = 37 bytes
RPC: [602306092A864886F71201020201010000FFFFFFFF9D723A63541210DFA04B735E19E10C8C]
RPC:
NFS: ----- Sun NFS -----
NFS:
NFS: Proc = 7 (Write to file)
NFS: File handle = [D2CC]
NFS: 0154002000000002000A000000001AE83632494A000A0000000000027D7FCB57
NFS: Offset = 0
NFS: Size = 12
NFS: Stable = ASYNC
NFS:

RPC: ----- SUN RPC Header -----
RPC:
RPC: Record Mark: last fragment, length = 184
RPC: Transaction id = 776075556
RPC: Type = 1 (Reply)
RPC: This is a reply to frame 35
RPC: Status = 0 (Accepted)
RPC: Verifier : Flavor = 6 (RPCSEC_GSS), len = 37 bytes
RPC: [602306092A864886F71201020201010000FFFFFFFFBC85B0E336149A57964D21545F575520]
RPC: Accept status = 0 (Success)
RPC:
NFS: ----- Sun NFS -----
NFS:
NFS: Proc = 7 (Write to file)
NFS: Status = 13 (Permission denied)
NFS: Pre-operation attributes:
NFS: Size = 0 bytes
NFS: Modification time = 08-Jun-05 14:14:23.115153000 GMT
NFS: Attribute change time = 08-Jun-05 14:14:23.115153000 GMT
NFS:
NFS: Post-operation attributes:
NFS: File type = 1 (Regular File)
NFS: Mode = 0644
NFS: Setuid = 0, Setgid = 0, Sticky = 0
NFS: Owner's permissions = rw-
NFS: Group's permissions = r--
NFS: Other's permissions = r--
NFS: Link count = 1, User ID = 103, Group ID = 10
NFS: File size = 0, Used = 0
NFS: Special: Major = 0, Minor = 0
NFS: File system id = 365072220192, File id = 6888
NFS: Last access time = 08-Jun-05 14:07:16.259030000 GMT
NFS: Modification time = 08-Jun-05 14:14:23.115153000 GMT
NFS: Attribute change time = 08-Jun-05 14:14:23.115153000 GMT
NFS:
NFS:

- Peter

-- 
-- 
Peter Eriksson <peter@ifm.liu.se>            Phone:    +46 13  28 2786
Computer Systems Manager/BOFH                Cell/GSM: +46 705 18 2786
Physics Department, Linköping University     Room:     Building F, F203


Relevant Pages

  • ex/vi and Secure NFS (IRIX/Solaris problem?)
    ... The directory is mounted using Secure NFS: ... RPC: Record Mark: last fragment, ... Proc = 7 ... NFS: Owner's permissions = rw- ...
    (comp.unix.solaris)
  • Re: [BUG] NFS with multiple clients connected
    ... Starting with 2.6.16 i started noticing that when having more than one of the clients doing a lot of in/out on their mounted nfs shares at list one of then starts to to have problems when writing files. ... RPC: ... The problem appears only when 2 diskless computers run apt-get in parallel so i suspect something related to bad file descriptors,maybe apt is reading / writing / moving it's status files too quick. ...
    (Linux-Kernel)
  • BK update for NFS client 2.6.11
    ... Update of the NFS client. ... NFS: cleanup create ... have been replaced by other remote file system clients. ... NFS,RPC: RPC client now advertises maximum payload size ...
    (Linux-Kernel)
  • Re: NFS problem, server = VMS-TCPIP, client = Solaris. Mount, hang...
    ... > from CSC was to use UDP instead of TCP for NFS communications (my ... > raise default RPC values: ... It's tough to believe that there's anything wrong with the client. ... (Well, with the client's NFS implementation, anyway.) ...
    (comp.os.vms)
  • RE: Setting up NFS shares
    ... A client can be either a host or a client group. ... the appropriate permissions. ... Share Windows Folders by Using Server for NFS ... Click the NFS Sharing tab, and then click Share this folder. ...
    (microsoft.public.windows.file_system)