[linux-cifs-client] cifs: mount error 20 = Not a directory, while it works with smbclient

Andreas Hegyi andreas at hegyi.info
Wed Nov 21 21:56:56 GMT 2007


On my compies network I want to mount a Windows share under my Linux 
box. While I can access the share with smbclient, I cannot mount it with 
mount -t cifs. The only reason I can imagine is that for the share that 
I mount I don't have permission to have a directory listing (see result 
of smbclient below), but I *can* change to the subdirectory ( in this 
case 'iedereen', which is actually the relevant one for me). mount -t 
cifs says that the share is not a directory. Any suggestions how I could 
get mount working?

The commands and results are the following:

*- with smbclient:*
[a at ipl ~]$ smbclient '//citgwn7/t&p' -U 'citg\myusername%mypassword'
Domain=[CITG] OS=[Windows Server 2003 3790 Service Pack 2] 
Server=[Windows Server 2003 5.2]
smb: \> dir
NT_STATUS_ACCESS_DENIED listing \*

65535 blocks of size 33554432. 19331 blocks available
smb: \> cd iedereen
smb: \iedereen\> dir
. D 0 Thu Nov 8 14:16:17 2007
.. D 0 Thu Nov 8 14:16:17 2007
### Halloweenfeest D 0 Mon Nov 5 11:22:14 2007
##_Algemene_Leiding D 0 Fri Sep 14 15:13:21 2007
##_Literature D 0 Thu Feb 15 15:20:54 2007
##_ProjectRapportages_T&P

... and a long list of files and dirs, so this works.

*- with mount -t cifs*:
[root at ipl ~]# mount -t cifs '//citgwn7/t&p' /mnt/H -o 
'user=myusername,pass=mypassword'
mount error 20 = Not a directory
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

Directly mounting //citgwn7/t&p/iedereen gives the same error.

===
The debug output is the following:
fs/cifs/cifsfs.c: Devname: //citgwn7/t&p flags: 64
 fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 31 with uid: 0
 fs/cifs/connect.c: Domain name set
 fs/cifs/connect.c: Username: ahegyi
 fs/cifs/connect.c: UNC: \\citgwn7\t&p ip: 130.161.171.17
 fs/cifs/connect.c: Socket created
 fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x7fffffffffffffff
 fs/cifs/connect.c: Demultiplex PID: 4354
 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 0x6d)
 fs/cifs/cifssmb.c: Dialect: 2
 fs/cifs/cifssmb.c: negprot rc 0
 fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x1f3fd TimeAdjust: 
-3600
 fs/cifs/sess.c: sess setup type 1
 fs/cifs/transport.c: For smb_command 115
 fs/cifs/transport.c: Sending smb:  total_len 250
 fs/cifs/connect.c: rfc1002 length 0xb7)
 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 = 10241
 fs/cifs/sess.c: bleft 138
 fs/cifs/sess.c: words left: -1
 fs/cifs/sess.c: ssetup freeing small buf ffff81007ebe38c0
 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 78
 fs/cifs/connect.c: rfc1002 length 0x42)
 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 0x44)
 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 0x50)
 fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 31) rc = 0
 fs/cifs/inode.c: CIFS VFS: in cifs_read_inode as Xid: 32 with uid: 0
 fs/cifs/inode.c: Getting info on
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 74
 fs/cifs/connect.c: rfc1002 length 0x27)
 fs/cifs/connect.c: invalid transact2 word count
Status code returned 0xc0000022 NT_STATUS_ACCESS_DENIED
 fs/cifs/netmisc.c:  !!Mapping smb error code 5 to POSIX err -13 !!
 fs/cifs/cifssmb.c: Send error in QPathInfo = -13
SELinux: initialized (dev cifs, type cifs), uses genfs_contexts
 fs/cifs/cifsfs.c: In cifs_put_super
 fs/cifs/connect.c: CIFS VFS: in cifs_umount as Xid: 33 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 0x2b)
 fs/cifs/connect.c: Waking up socket by sending it signal
 fs/cifs/connect.c: CIFS VFS: leaving cifs_umount (xid = 33) rc = 0

I unfortunately do not know how to interpret these messages.
Any suggestions what goes wrong, and how I could mount the share?


-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list