[linux-cifs-client] mount.cifs gives error 20 with old[er] Samba servers, any fixes?

Chris G cl at isbd.net
Fri Nov 16 14:48:55 GMT 2007


On Fri, Nov 16, 2007 at 06:35:49AM -0500, Jeff Layton wrote:
> On Thu, 15 Nov 2007 22:39:25 +0000
> Chris G <cl at isbd.net> wrote:
> 
> > I am running Fedora 7 which has mount.cifs version: 1.10.
> > 
> > This works fine with 'real' Windows XP shared files so it would seem
> > that it is installed and functional.
> > 
> > However when I try and mount a network hard drive that runs a Samba
> > server I get the error:-
> > 
> >     mount error 20 = Not a directory
> >     Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
> > 
> 
> It sounds like the client is unable to get info on this directory. I'd
> suspect a permissions issue, but then you'd think that smbfs would have
> issues too. One possibility is that unix extensions were negotiated,
> but the server doesn't properly support them.
> 
> You might try disabling unix extensions (-o nounix on recent kernels).
> 
No, same error with nounix hung on the end of the options.


> > Searching Google for this error suggests that it's some sort of
> > incompatibility between mount.cifs and older Samba servers.
> > 
> > I happend to have an old Slackware system which still has smbmount
> > from Samba Version 3.0.23c, this mounts my share without problems.
> > 
> > E.g. the following works from my Slackware system:-
> > 
> >     smbmount //192.168.1.65/chris /freecom -o
> > username=chris,password=xxxxxxx,workgroup=IBMPEERS
> > 
> > but the mount.cifs on my Fedora system doesn't work:-
> > 
> >     mount.cifs //192.168.1.65/chris /freecom -o
> > username=chris,password=xxxxxxx,workgroup=IBMPEERS mount error 20 =
> > Not a directory Refer to the mount.cifs(8) manual page (e.g.man
> > mount.cifs)
> > 
> >     
> > 
> > 
> > Is there any sort of workaround for this problem?  It would be a real
> > hassle to get smbmount/mount.smbfs built on Fedora 7.  Yes, I know it
> > would be good if the Network Drive could be fixed to work with CIFS
> > but I suspect that could be a good long way in the future.
> > 
> 
> It would be helpful to know why it's failing. You might want to collect
> some debugging info while trying to mount:
> 
> # modprobe cifs
> # echo 7 > /proc/fs/cifs/cifsFYI
> # mount.cifs //192.168.1.65/chris /freecom ...
> # echo 0 > /proc/fs/cifs/cifsFYI
> 
Here's the dmesg output:-

 fs/cifs/cifsfs.c: Devname: //192.168.1.65/chris flags: 64 
 fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 23 with uid: 0
 fs/cifs/connect.c: Domain name set
CIFS: Unknown mount option nounix
 fs/cifs/connect.c: Username: chris 
 fs/cifs/connect.c: UNC: \\192.168.1.65\chris ip: 192.168.1.65
 fs/cifs/connect.c: Socket created
 fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x7fffffffffffffff
 fs/cifs/transport.c: Sending smb of length 68
 fs/cifs/connect.c: Demultiplex PID: 18653
 fs/cifs/connect.c: rfc1002 length 0x82000004)
 fs/cifs/connect.c: Good RFC 1002 session rsp
 fs/cifs/connect.c: Existing smb sess not found
 fs/cifs/cifssmb.c: secFlags 0x7
 fs/cifs/transport.c: For smb_command 114
 fs/cifs/transport.c: Sending smb of length 78
 fs/cifs/connect.c: rfc1002 length 0x51)
 fs/cifs/cifssmb.c: Dialect: 2
 fs/cifs/cifssmb.c: share mode security
 fs/cifs/cifssmb.c: negprot rc 0
 fs/cifs/connect.c: Security Mode: 0x2 Capabilities: 0x8023fd TimeAdjust: -7200
 fs/cifs/sess.c: sess setup type 1
 fs/cifs/transport.c: For smb_command 115
 fs/cifs/transport.c: Sending smb:  total_len 256
 fs/cifs/connect.c: rfc1002 length 0x2d)
 fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
 fs/cifs/sess.c: ssetup rc from sendrecv2 is 0
 fs/cifs/sess.c: UID = 0 
 fs/cifs/sess.c: bleft 0
 fs/cifs/sess.c: ssetup freeing small buf ffff8101ab80e380
 fs/cifs/connect.c: CIFS Session Established successfully
 fs/cifs/connect.c: file mode: 0x7f7  dir mode: 0x1ff
 fs/cifs/transport.c: For smb_command 117
 fs/cifs/transport.c: Sending smb of length 116
 fs/cifs/connect.c: rfc1002 length 0x30)
 fs/cifs/connect.c: Tcon flags: 0x1 
 fs/cifs/connect.c: CIFS Tcon rc = 0
 fs/cifs/cifssmb.c: In QFSDeviceInfo
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 68
 fs/cifs/connect.c: rfc1002 length 0x27)
 fs/cifs/connect.c: invalid transact2 word count
 fs/cifs/netmisc.c:  !!Mapping smb error code 31 to POSIX err -5 !!
 fs/cifs/cifssmb.c: Send error in QFSDeviceInfo = -5
 fs/cifs/cifssmb.c: In QFSAttributeInfo
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 68
 fs/cifs/connect.c: rfc1002 length 0x51)
 fs/cifs/cifssmb.c: In QFSUnixInfo
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 68
 fs/cifs/connect.c: rfc1002 length 0x51)
 fs/cifs/connect.c: negotiated posix acl support
 fs/cifs/connect.c: negotiate posix pathnames
 fs/cifs/connect.c: Negotiate caps 0x1b
 fs/cifs/cifssmb.c: In SETFSUnixInfo
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 82
 fs/cifs/connect.c: rfc1002 length 0x27)
 fs/cifs/connect.c: invalid transact2 word count
 fs/cifs/netmisc.c:  !!Mapping smb error code 31 to POSIX err -5 !!
 CIFS VFS: Send error in SETFSUnixInfo = -5
 fs/cifs/connect.c: setting capabilities failed
 fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 23) rc = 0
 fs/cifs/inode.c: CIFS VFS: in cifs_read_inode as Xid: 24 with uid: 0
 fs/cifs/inode.c: Getting info on 
 fs/cifs/cifssmb.c: In QPathInfo (Unix) the path 
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 74
 fs/cifs/connect.c: rfc1002 length 0x53)
 fs/cifs/cifsfs.c: In cifs_put_super
 fs/cifs/connect.c: CIFS VFS: in cifs_umount as Xid: 25 with uid: 0
 fs/cifs/cifssmb.c: In tree disconnect
 fs/cifs/transport.c: For smb_command 113
 fs/cifs/transport.c: Sending smb of length 35
 fs/cifs/connect.c: rfc1002 length 0x27)
 fs/cifs/connect.c: About to do SMBLogoff 
 fs/cifs/cifssmb.c: In SMBLogoff for session disconnect
 fs/cifs/transport.c: For smb_command 116
 fs/cifs/transport.c: Sending smb of length 39
 fs/cifs/connect.c: rfc1002 length 0x27)
 fs/cifs/connect.c: Waking up socket by sending it signal
 fs/cifs/connect.c: cifsd thread killed
 fs/cifs/connect.c: CIFS VFS: leaving cifs_umount (xid = 25) rc = 0

It didn't understand the nounix!  There's a couple of other errors but
I'm not competant to understand them.

> ...then collect the debug output from dmesg and post it here (or try
> to track it down yourself). It would also be helpful to know what
> kernel version you have and the version of the smbclient package you
> have installed.

Kernel: Linux home 2.6.22.9-91.fc7 #1 SMP Thu Sep 27 20:47:39 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

The smbclient I used is on another computer on the same network
running Slackware Linux.  On that computer I get:-

    root at garage:~# smbclient -V
    Version 3.0.23c
    root at garage:~# 

-- 
Chris Green


More information about the linux-cifs-client mailing list