Bugzilla – Bug 150403
cifs mounted directories dont contain . / ..
Last modified: 2008-06-25 09:53:39 UTC
as root I mounted a cifs share from a XP SP2 box like this: mount -t cifs //192.168.16.128/f$ /mnt/1 -ouser=administrator%geheim a ls -la show this: pell:~ # ls -la /mnt/1 total 0 drwxrwxrwx 1 root root 0 Oct 24 02:38 RECYCLER drwxrwxrwx 1 root root 0 Dec 13 00:31 System Volume Information drwxrwxrwx 1 root root 0 Feb 11 19:43 down drwxrwxrwx 1 root root 0 Feb 12 23:59 temp first question was: where is "." and ".." ? then as non-root user I tried to create file: bjacke@pell:~> touch /mnt/1/test touch: Setzen der Zeiten für „/mnt/1/test“: Keine Berechtigung but though it claims I wouldn't have the rights it created it: ls -la /mnt/1/ insgesamt 0 drwxrwxrwx 1 root root 0 2006-02-11 19:43 down drwxrwxrwx 1 root root 0 2005-10-24 02:38 RECYCLER drwxrwxrwx 1 root root 0 2005-12-13 00:31 System Volume Information drwxrwxrwx 1 root root 0 2006-02-12 23:59 temp -rw-r--r-- 1 root root 0 2006-02-13 14:22 test still no "." and no ".." but: a "test" exists though I had no rights due to the message. uname -a Linux pell 2.6.16-rc2-git2-3-default #1 Mon Feb 6 23:30:07 UTC 2006 i686 i686 i386 GNU/Linux
ah, I overlooked the "Setzen der Zeiten" - so access was not totally denied ;-) But the question for the missing "." and ".." remains.
Steve, could you please take a look?
I have only seen one case in which a server fails to return . and .. in search results, and I have never seen it with Windows. It would also be useful to see the output of "cat /proc/fs/cifs/DebugData" (that lets us see whether your session is authenticated by the server as "guest" or a real user) and it also might be helpful to see an ethereal trace to see whether the server really failed to return . and .. in the search results or whether those entries were discarded by the client for some unknwon reason
Steve: this happens with all XP (tested just SP2) versions if you mount the default C$ disk root share. It should be reproducable for you very easy. If not I'm going to collect and send you more degug data...
This seems to be true - Windows server will not return . and .. on a share exporting the root of a drive. Presumably POSIX requires . and .. to be returned no matter what the server says? Also want to verify that this is important enough for me to code around this behavior on the client (ie add code to fs/cifs/readdir.c for inserting . and .. in search results when the server forgets to return them).
Steven, do you need more information from Björn?
This is fixed in cifs 1.42 (IIRC you have version 1.40 of cifs). The changes to cifs_readdir to fix this and a loosely related search rewind problem were rather large - and rather than make a patch for just these available I will be making a larger update version of cifs 1.44 available later in the week (which also will include NTLMv2 security and some key fixes for POSIX locking which are more important).
Could you confirm that this is fixed by the readdir change (which is also in current cifs) which is included in the rollup fixed version: http://us1.samba.org/samba/ftp/cifs-cvs/cifs-1.44.tar.gz
This is now fixed in our kernels, right Steve?
This was fixed in cifs version 1.42 (I think SLES10 is at 1.44 but will check).
My test machine had 2.6.16.11-7 kernel which did not have this fix (it had cifs version 1.40). I don't have a more recent SLES10 build installed (to see if it was picked up as we had suggested) The cifs version 1.44 above (as well as slight more current http://us1.samba.org/samba/ftp/cifs-cvs/cifs-1.45.tar.gz) do have this fix (it was put into mainline with a pair of changesets on 4/23/06).
SLES10 has 2.6.16.23 or so. I do not think you upgraded the sifs layer in the stable releases :). So, please backport the fix needed, if you wish to fix this, or close it out as something that you will not support.
There are cifs fixes in the stable series, but even stripped down this fix would be a little too large (perhaps 30 lines of code or so) than is typical for the stable release patch and it does not fix a serious enough problem as far as I could tell (it only affects shares of the root of a drive, not all servers have the problem of forgetting to return .. etc.). We will continue to track/test the larger cifs backport for SLES9 and SLES10 service packs (and work with jra etcc) - as there are key fixes in there necessary for 1) NTLMv2 (stronger authentication requirement) 2) marking smbfs obsolete 3) fixing posix byte range locking that are more important (and it includes a rollup of the lower severity bug fixes) but it would be too high risk to break them apart.
mass reopening all SuSE Linux bugs that are set to REMIND+LATER to change the resolution to WONTFIX (adapting to new policy)
Closing old LATER+REMIND bugs as WONTFIX - if you still plan to work on it, feel free to reopen and set to ASSIGNED. In case the report saw repeated reopen comments, it's due to bugzilla timing out on the huge request ;(