> Finn Arne Gangstad wrote:
> > I have the same problem here. NFS server is an aix 4.1.3 machine.
> > Linux is 2.1.65 (sorry about that) SMP, dual ppro, 3c905 ethernet card
> >
> > voldsboks:finnag:(710)$ mkdir urg; cd urg
> > bash: cd: urg: Not a directory
> > voldsboks:finnag:(711)$ cd urg
> > voldsboks:urg:(712)$
> >[...]
>
> The only thing that comes to mind is that 5 seconds is the lifetime of a
> file dentry under NFS -- if it's older than 5 seconds, a new server
> lookup is performed. Directory dentries have a lifetime of 10 seconds.
>
> I'm going to add a test to the nfs client mkdir code to check for bad
> modes, but this sounds like it might be a problem with the aix server.
>
> The Linux NFS client doesn't censor the file mode returned by the server
> in any way -- it just installs it in the inode. So if we get a trash
> value ...
I ran snoop -v on a solaris machine to see what really happens, this might
be interesting. It seems you can't trust the reply on a mkdir. I'm not
sure whether this is against the spec or not.
voldsboks (the linux macine) sends:
RPC: ----- SUN RPC Header -----
RPC:
RPC: Transaction id = 490996224
RPC: Type = 0 (Call)
RPC: RPC version = 2
RPC: Program = 100003 (NFS), version = 2, procedure = 14
RPC: Credentials: Flavor = 1 (Unix), len = 108 bytes
RPC: (...)
RPC: Verifier : Flavor = 0 (None), len = 0 bytes
RPC:
NFS: ----- Sun NFS -----
NFS:
NFS: Proc = 14 (Make directory)
NFS: File handle = (...)
NFS: File name = foodir
NFS: Mode = 0755
NFS: Type = ?
NFS: Setuid = 0, Setgid = 0, Sticky = 0
NFS: Owner's permissions = rwx
NFS: Group's permissions = r-x
NFS: Other's permissions = r-x
NFS: UID = -1
NFS: GID = -1
NFS: Size = -1
NFS: Access time = -1
NFS: Modification time = -1
NFS:
bigblue (the nfs server) replies:
RPC: ----- SUN RPC Header -----
RPC:
RPC: Transaction id = 490996224
RPC: Type = 1 (Reply)
RPC: This is a reply to frame 7
RPC: Status = 0 (Accepted)
RPC: Verifier : Flavor = 0 (None), len = 0 bytes
RPC: Accept status = 0 (Success)
RPC:
NFS: ----- Sun NFS -----
NFS:
NFS: Proc = 14 (Make directory)
NFS: Status = 0 (OK)
NFS: File handle = (...)
NFS: File type = 2 (Directory)
NFS: Mode = 0755
NFS: Type = ?
NFS: Setuid = 0, Setgid = 0, Sticky = 0
NFS: Owner's permissions = rwx
NFS: Group's permissions = r-x
NFS: Other's permissions = r-x
NFS: Link count = -1, UID = -1, GID = -1
NFS: File size = -1, Block size = -1, No. of blocks = -1
NFS: File system id = -1, File id = -1
NFS: Access time = -1
NFS: Modification time = -1
NFS: Inode change time = -1
NFS:
When making the directory from a HP-UX machine, similar packets are sent.
The HP-UX machine doesn't have any problems with the directory, however.
When making the dir on a HP-UX nfs server, this is sent:
voldsboks (linux) -> iq(HP-UX)
RPC: ----- SUN RPC Header -----
RPC:
RPC: Transaction id = 3947168256
RPC: Type = 0 (Call)
RPC: RPC version = 2
RPC: Program = 100003 (NFS), version = 2, procedure = 14
RPC: Credentials: Flavor = 1 (Unix), len = 108 bytes
RPC: (...)
RPC: Verifier : Flavor = 0 (None), len = 0 bytes
RPC:
NFS: ----- Sun NFS -----
NFS:
NFS: Proc = 14 (Make directory)
NFS: File handle = (...)
NFS: File name = urk
NFS: Mode = 0755
NFS: Type = ?
NFS: Setuid = 0, Setgid = 0, Sticky = 0
NFS: Owner's permissions = rwx
NFS: Group's permissions = r-x
NFS: Other's permissions = r-x
NFS: UID = -1
NFS: GID = -1
NFS: Size = -1
NFS: Access time = -1
NFS: Modification time = -1
NFS:
iq -> voldsboks
RPC: ----- SUN RPC Header -----
RPC:
RPC: Transaction id = 3947168256
RPC: Type = 1 (Reply)
RPC: This is a reply to frame 3
RPC: Status = 0 (Accepted)
RPC: Verifier : Flavor = 0 (None), len = 0 bytes
RPC: Accept status = 0 (Success)
RPC:
NFS: ----- Sun NFS -----
NFS:
NFS: Proc = 14 (Make directory)
NFS: Status = 0 (OK)
NFS: File handle = (...)
NFS: File type = 2 (Directory)
NFS: Mode = 042755
NFS: Type = Directory
NFS: Setuid = 0, Setgid = 1, Sticky = 0
NFS: Owner's permissions = rwx
NFS: Group's permissions = r-x
NFS: Other's permissions = r-x
NFS: Link count = 2, UID = 21574, GID = 6
NFS: File size = 96, Block size = 8192, No. of blocks = 0
NFS: File system id = 1073807363, File id = 888
NFS: Access time = 05-Dec-97 20:15:24.317853 GMT
NFS: Modification time = 05-Dec-97 20:15:24.317853 GMT
NFS: Inode change time = 05-Dec-97 20:15:24.317853 GMT
NFS:
- Finn Arne