Bug 4040 - Support deep tree mounts
Summary: Support deep tree mounts
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: Other Linux
: P3 normal
Target Milestone: ---
Assignee: Steve French
QA Contact:
Depends on:
Reported: 2006-08-21 09:18 UTC by Pierre Ossman
Modified: 2006-11-02 11:24 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Ossman 2006-08-21 09:18:49 UTC
The Windows feature of being able to mount //server/share/deep/tree would be nice to have on Linux. The magic being done by a Windows client seems to be to simple prepend all paths sent to the server with /deep/tree, so this shouldn't be that tricky to implement on Linux.

There is a practical feature to this. Doing a deep tree mount requires less access on the server than mounting the share and doing a 'cd' to the relevant subdir. The latter requires the "Read attributes" permission on all intermediate folders on the server.
Comment 1 Andrew Ferguson 2006-08-26 16:47:27 UTC
This could be useful for supporting deep DFS referrals, as well. Bugs 3651 and 3645 describe the problem as it pertains to smbclient.
Comment 2 krauz 2006-09-27 07:18:00 UTC
We use this kind of mounts on windows platform and the starting directories do not have read access (company's management decision), so linux mounts are unable to do 'cd' and thus cannot access the share. The smbclient has such a feature with -D option. Something like this shall be supported by cifs.
Comment 3 Steve French 2006-11-02 11:24:30 UTC
This is now implemented in the cifs kernel module (in cifs 1.46, and 2.6.19 kernel).  Without changes to the user space mount helper (mount.cifs) it requires that you specify mount option "prefixpath=" on the mount though.

so instead of
   mount -t cifs //server/share/deep/tree  /mnt
you would type
   mount -t cifs //server/share /mnt -o prefixpath=/deep/tree