[linux-cifs-client] Mounting directories below share level

J. A. Landamore jal at mcs.le.ac.uk
Tue Mar 8 13:43:28 GMT 2005


On Friday 4th March 2005, Steven French said, in part:

> I did some experiments and confirmed that for this "deep mapping"
> (http://www.windowsnetworking.com/articles_tutorials/w2kdmap.html) mount 
of
> a complex target ie \\server\share\dir
> 1) the path component following the share name is not sent by windows (it
> is sent by linux cifs and smbfs - and samba then rejects the tree 
connect)
> 2) the permissions of the parent directory (the root of the server share)
> can be deny for the user doing the Windows NET USE (since the root of the
> server share is not visible on the client)
> 3) the permissions of the parent directory (the root of the server share)
> can be deny for the user doing a Linux cifs client mount of 
\\server\share
> as well (it will look like no files are present) and
>      mount --bind /mnt/some_sub_dir_of_the_server_share /some_local_dir
> works fine for achieving the "deep mapping" effect (at least to Windows
> server from Linux cifs) even if the user has no permissions on root of
> server share

I hesitate to take issue with people who are obviously much more 
knowledgeable about the subject than I am, but my limited tests on our 
system haven't been able to cifs mount a share that I don't have rights to.
As I said in my mail of 7th March, I can "mount -t smb" a share that I have 
no rights to; however I cannot "mount -t cifs" the same share.  If I set 
cifsFYI to 1, I get the attached information logged through syslog.  I 
assume, naively, that it is the cifs_read_inode that generates the 
ACCESS_DENIED error.

Just to save going back up the thread, the command I tried was:

 mount -t cifs //ip.address/UserShare1$ /mnt -v -o 
user=test,pass=******,netbiosname=ma
 
As the mount appears to have been OK, can I stop cifs trying to access the 
share after mount?  I tried -o noserverino but it comes back as an unknown 
option.

mount.cifs version 1.5
kernel 2.6.9

TIA for any help & advice

John

John Landamore

School of Mathematics & Computer Science
University of Leicester
University Road, LEICESTER, LE1 7RH
J.Landamore at mcs.le.ac.uk
Phone: +44 (0)116 2523410       Fax: +44 (0)116 2523604

-------------- next part --------------
Mar  8 13:26:46 ma kernel:  fs/cifs/cifsfs.c: Devname: //ip.address/UserShare1$ flags: 64 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 62 with uid: 0
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Username: test 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: UNC: \\ip.address\UserShare1$ ip: ip.address
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Socket created
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Existing smb sess not found 
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: For smb_command 114
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: Sending smb of length 47 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Demultiplex PID: 3631
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Peek length rcvd: 0x24 beginning 0x65)
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c:  Mid 0xa9 matched - waking up 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x1f3fd Time Zone: 0
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: In sesssetup 
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: For smb_command 115
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: Sending smb of length 234 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Peek length rcvd: 0x24 beginning 0x97)
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c:  Mid 0xaa matched - waking up 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: UID = 2050 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: CIFS Session Established successfully
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: file mode: 0x7f7  dir mode: 0x1ff
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: For smb_command 117
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: Sending smb of length 106 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Peek length rcvd: 0x24 beginning 0x42)
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c:  Mid 0xab matched - waking up 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Tcon flags: 0x1 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: CIFS Tcon rc = 0
Mar  8 13:26:46 ma kernel:  fs/cifs/cifssmb.c: In QFSDeviceInfo
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: For smb_command 50
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: Sending smb of length 68 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Peek length rcvd: 0x24 beginning 0x44)
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c:  Mid 0xac matched - waking up 
Mar  8 13:26:46 ma kernel:  fs/cifs/cifssmb.c: In QFSAttributeInfo
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: For smb_command 50
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: Sending smb of length 68 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Peek length rcvd: 0x24 beginning 0x50)
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c:  Mid 0xad matched - waking up 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 62) rc = 0
Mar  8 13:26:46 ma kernel:  fs/cifs/inode.c: CIFS VFS: in cifs_read_inode as Xid: 63 with uid: 0
Mar  8 13:26:46 ma kernel:  fs/cifs/inode.c: Getting info on  
Mar  8 13:26:46 ma kernel:  fs/cifs/cifssmb.c: In QPathInfo path 
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: For smb_command 50
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: Sending smb of length 74 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Peek length rcvd: 0x24 beginning 0x27)
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c:  Mid 0xae matched - waking up 
Mar  8 13:26:46 ma kernel: Status code returned 0xc0000022 NT_STATUS_ACCESS_DENIED
Mar  8 13:26:46 ma kernel:  fs/cifs/netmisc.c:  !!Mapping smb error code 5 to POSIX err -13 !!
Mar  8 13:26:46 ma kernel:  fs/cifs/cifssmb.c: Send error in QPathInfo = -13
Mar  8 13:26:46 ma kernel:  fs/cifs/cifsfs.c: In cifs_put_super
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: CIFS VFS: in cifs_umount as Xid: 64 with uid: 0
Mar  8 13:26:46 ma kernel:  fs/cifs/cifssmb.c: In tree disconnect
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: For smb_command 113
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: Sending smb of length 35 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Peek length rcvd: 0x24 beginning 0x27)
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c:  Mid 0xaf matched - waking up 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: About to do SMBLogoff 
Mar  8 13:26:46 ma kernel:  fs/cifs/cifssmb.c: In SMBLogoff for session disconnect
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: For smb_command 116
Mar  8 13:26:46 ma kernel:  fs/cifs/transport.c: Sending smb of length 39 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Peek length rcvd: 0x24 beginning 0x2b)
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c:  Mid 0xb0 matched - waking up 
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Waking up socket by sending it signal
Mar  8 13:26:46 ma kernel:  fs/cifs/connect.c: Wait for exit from demultiplex thread
Mar  8 13:26:47 ma kernel:  fs/cifs/connect.c: CIFS VFS: leaving cifs_umount (xid = 64) rc = 0


More information about the linux-cifs-client mailing list