Hi, I think that this problem is related to: http://article.gmane.org/gmane.linux.kernel.cifs/3878 I have this fileserver structure: - complete path: //fileserver-la-01/ti$/geral/ - //fileserver-la-01/ti$: in this parent dir, my user don't have permission to access Using the kernel version 2.6.38 the mount reports: # mount -v /mnt/xxxx/latigeral/ parsing options: rw,credentials=/etc/credentials,uid=1000 mount.cifs kernel mount options unc=//fileserver-la-01\ti$,user=xxxxxx,pass=xxxxx,ver=1,rw,credentials=/etc/credentials,uid=1000,prefixpath=geral/ # Using the kernel 3.0.2: # mount -v /mnt/xxxx/latigeral parsing options: rw,credentials=/etc/credentials,uid=1000 mount.cifs kernel mount options unc=//fileserver-la-01\ti$,user=xxxxxx,pass=xxxxx,ver=1,rw,credentials=/etc/credentials,uid=1000,prefixpath=geral/ mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g.man mount.cifs) # The cifsFYI messages are in the attachments, cifsFYI.txt. To workaround this problem (in my box), I had set the 'full_path' (from prefixpath) in the call to cifs_get_inode_info in the function cifs_root_iget (~ inode.c:888), if the prefixpath isn't null. This worked for me, but it's bad solution, I think (i'm not a programmer :( ). What do you think about this problem? There are a 'good' solution for it? Thanks, -- Rafael Ganascim
Using the kernel version 2.6.38 the mount reports: # mount -v /mnt/xxxx/latigeral/ parsing options: rw,credentials=/etc/credentials,uid=1000 mount.cifs kernel mount options unc=//fileserver-la-01\ti$,user=xxxxxx,pass=xxxxx,ver=1,rw,credentials=/etc/credentials,uid=1000,prefixpath=geral/ # # dmesg ... fs/cifs/cifsfs.c: Devname: //fileserver-la-01/ti$/geral/ flags: 64 fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 27 with uid: 0 fs/cifs/connect.c: prefix path /geral/ fs/cifs/connect.c: Username: xxxx fs/cifs/connect.c: UNC: \\fileserver-la-01\ti$ ip: 172.25.4.13 fs/cifs/connect.c: Socket created fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x1b58 fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 28 with uid: 0 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: total_len 73 fs/cifs/connect.c: Demultiplex PID: 3327 fs/cifs/connect.c: rfc1002 length 0x79 fs/cifs/transport.c: sync_mid_result: cmd=114 mid=1 state=4 fs/cifs/cifssmb.c: Dialect: 2 fs/cifs/cifssmb.c: negprot rc 0 fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x1f3fc TimeAdjust: 10800 fs/cifs/sess.c: sess setup type 1 fs/cifs/transport.c: For smb_command 115 fs/cifs/transport.c: Sending smb: total_len 252 fs/cifs/connect.c: rfc1002 length 0xd1 fs/cifs/transport.c: sync_mid_result: cmd=115 mid=2 state=4 fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release fs/cifs/sess.c: UID = 6145 fs/cifs/sess.c: bleft 163 fs/cifs/sess.c: serverOS=Windows Server 2008 R2 Standard 7600 fs/cifs/sess.c: serverNOS=Windows Server 2008 R2 Standard 6.1 fs/cifs/sess.c: serverDomain=xxxx-BR fs/cifs/sess.c: ssetup freeing small buf f5013d40 fs/cifs/connect.c: CIFS Session Established successfully fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 28) rc = 0 fs/cifs/connect.c: file mode: 0x1ed dir mode: 0x1ed fs/cifs/connect.c: CIFS VFS: in cifs_get_tcon as Xid: 29 with uid: 0 fs/cifs/transport.c: For smb_command 117 fs/cifs/transport.c: Sending smb: total_len 100 fs/cifs/connect.c: rfc1002 length 0x42 fs/cifs/transport.c: sync_mid_result: cmd=117 mid=3 state=4 fs/cifs/connect.c: disk share connection fs/cifs/connect.c: nativeFileSystem=NTFS fs/cifs/connect.c: Tcon flags: 0x1 fs/cifs/connect.c: CIFS VFS: leaving cifs_get_tcon (xid = 29) rc = 0 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: total_len 72 fs/cifs/connect.c: rfc1002 length 0x44 fs/cifs/transport.c: sync_mid_result: cmd=50 mid=4 state=4 fs/cifs/cifssmb.c: In QFSAttributeInfo fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 72 fs/cifs/connect.c: rfc1002 length 0x50 fs/cifs/transport.c: sync_mid_result: cmd=50 mid=5 state=4 fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 92 fs/cifs/connect.c: rfc1002 length 0xbe fs/cifs/transport.c: sync_mid_result: cmd=50 mid=6 state=4 fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 27) rc = 0 fs/cifs/inode.c: CIFS VFS: in cifs_root_iget as Xid: 30 with uid: 0 fs/cifs/inode.c: Getting info on \geral\ fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 92 fs/cifs/connect.c: rfc1002 length 0xbe fs/cifs/transport.c: sync_mid_result: cmd=50 mid=7 state=4 fs/cifs/cifssmb.c: In GetSrvInodeNum for \geral\ fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 92 fs/cifs/connect.c: rfc1002 length 0x48 fs/cifs/transport.c: sync_mid_result: cmd=50 mid=8 state=4 fs/cifs/inode.c: looking for uniqueid=1970324837000647 fs/cifs/inode.c: cifs_revalidate_cache: revalidating inode 1970324837000647 fs/cifs/inode.c: cifs_revalidate_cache: inode 1970324837000647 is new fs/cifs/inode.c: inode 0xe987c374 old_time=0 new_time=-121655 ... Using the kernel 3.0.2: # mount -v /mnt/xxxx/latigeral parsing options: rw,credentials=/etc/credentials,uid=1000 mount.cifs kernel mount options unc=//fileserver-la-01\ti$,user=xxxxxx,pass=xxxxx,ver=1,rw,credentials=/etc/credentials,uid=1000,prefixpath=geral/ mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g.man mount.cifs) # # dmesg ... fs/cifs/cifsfs.c: Devname: //fileserver-la-01/ti$/geral/ flags: 64 fs/cifs/connect.c: prefix path /geral/ fs/cifs/connect.c: Username: xxxxxx fs/cifs/connect.c: file mode: 0x1ed dir mode: 0x1ed fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 0 with uid: 0 fs/cifs/connect.c: UNC: \\fileserver-la-01\ti$ ip: 172.25.4.13 fs/cifs/netmisc.c: address conversion returned 1 for 172.25.4.13 fs/cifs/connect.c: Socket created fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6 fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 1 with uid: 0 fs/cifs/connect.c: Existing smb sess not found CIFS VFS: default security mechanism requested. The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.1 fs/cifs/cifssmb.c: secFlags 0x7 fs/cifs/transport.c: For smb_command 114 fs/cifs/transport.c: Sending smb: total_len 82 fs/cifs/connect.c: Demultiplex PID: 4435 fs/cifs/connect.c: rfc1002 length 0x79 fs/cifs/transport.c: cifs_sync_mid_result: cmd=114 mid=1 state=4 fs/cifs/cifssmb.c: Dialect: 2 fs/cifs/cifssmb.c: Max buf = 16472 fs/cifs/cifssmb.c: negprot rc 0 fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x1f3fc TimeAdjust: 10800 fs/cifs/sess.c: sess setup type 1 fs/cifs/transport.c: For smb_command 115 fs/cifs/transport.c: Sending smb: total_len 254 fs/cifs/connect.c: rfc1002 length 0xd1 fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=2 state=4 fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release fs/cifs/sess.c: UID = 2048 fs/cifs/sess.c: bleft 163 fs/cifs/sess.c: serverOS=Windows Server 2008 R2 Standard 7600 fs/cifs/sess.c: serverNOS=Windows Server 2008 R2 Standard 6.1 fs/cifs/sess.c: serverDomain=XXXXX-BR fs/cifs/sess.c: ssetup freeing small buf f5426f40 fs/cifs/connect.c: CIFS Session Established successfully fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 1) rc = 0 fs/cifs/connect.c: CIFS VFS: in cifs_get_tcon as Xid: 2 with uid: 0 fs/cifs/transport.c: For smb_command 117 fs/cifs/transport.c: Sending smb: total_len 100 fs/cifs/connect.c: rfc1002 length 0x42 fs/cifs/transport.c: cifs_sync_mid_result: cmd=117 mid=3 state=4 fs/cifs/connect.c: disk share connection fs/cifs/connect.c: nativeFileSystem=NTFS fs/cifs/connect.c: Tcon flags: 0x1 fs/cifs/connect.c: CIFS VFS: leaving cifs_get_tcon (xid = 2) rc = 0 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: total_len 72 fs/cifs/connect.c: rfc1002 length 0x44 fs/cifs/transport.c: cifs_sync_mid_result: cmd=50 mid=4 state=4 fs/cifs/cifssmb.c: In QFSAttributeInfo fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 72 fs/cifs/connect.c: rfc1002 length 0x50 fs/cifs/transport.c: cifs_sync_mid_result: cmd=50 mid=5 state=4 fs/cifs/connect.c: build_unc_path_to_root: full_path=\\fileserver-la-01\ti$\geral\ fs/cifs/transport.c: For smb_command 117 fs/cifs/transport.c: Sending smb: total_len 92 fs/cifs/connect.c: rfc1002 length 0x3c fs/cifs/transport.c: cifs_sync_mid_result: cmd=117 mid=6 state=4 fs/cifs/connect.c: CIFS Tcon rc = 0 ipc_tid = 2049 fs/cifs/cifssmb.c: In GetDFSRefer the path \fileserver-la-01\ti$ fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 118 fs/cifs/connect.c: rfc1002 length 0x27 fs/cifs/connect.c: invalid transact2 word count fs/cifs/transport.c: cifs_sync_mid_result: cmd=50 mid=7 state=4 fs/cifs/netmisc.c: Mapping smb error code 0xc0000225 to POSIX err -5 fs/cifs/cifssmb.c: Send error in GetDFSRefer = -5 fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 92 fs/cifs/connect.c: rfc1002 length 0xbe fs/cifs/transport.c: cifs_sync_mid_result: cmd=50 mid=8 state=4 fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 0) rc = 0 fs/cifs/inode.c: CIFS VFS: in cifs_root_iget as Xid: 3 with uid: 0 fs/cifs/inode.c: Getting info on fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 78 fs/cifs/connect.c: rfc1002 length 0x27 fs/cifs/connect.c: invalid transact2 word count fs/cifs/transport.c: cifs_sync_mid_result: cmd=50 mid=9 state=4 fs/cifs/netmisc.c: Mapping smb error code 0xc0000022 to POSIX err -13 fs/cifs/cifssmb.c: Send error in QPathInfo = -13 CIFS VFS: cifs_read_super: get root inode failed fs/cifs/connect.c: cifs_put_tcon: tc_count=1 fs/cifs/connect.c: CIFS VFS: in cifs_put_tcon as Xid: 4 with uid: 0 fs/cifs/cifssmb.c: In tree disconnect fs/cifs/transport.c: For smb_command 113 fs/cifs/transport.c: Sending smb: total_len 39 fs/cifs/connect.c: rfc1002 length 0x27 fs/cifs/transport.c: cifs_sync_mid_result: cmd=113 mid=10 state=4 fs/cifs/transport.c: SendRcvNoRsp flags 64 rc 0 fs/cifs/connect.c: cifs_put_smb_ses: ses_count=1 fs/cifs/connect.c: CIFS VFS: in cifs_put_smb_ses as Xid: 5 with uid: 0 fs/cifs/cifssmb.c: In SMBLogoff for session disconnect fs/cifs/transport.c: For smb_command 116 fs/cifs/transport.c: Sending smb: total_len 43 fs/cifs/connect.c: rfc1002 length 0x2b fs/cifs/transport.c: cifs_sync_mid_result: cmd=116 mid=11 state=4 fs/cifs/transport.c: SendRcvNoRsp flags 64 rc 0 ...