Bug 187183 - cifs directory listings wrong
Summary: cifs directory listings wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Steve Dickson
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 176344 205629
TreeView+ depends on / blocked
 
Reported: 2006-03-29 00:43 UTC by John Newbigin
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2007-0304
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-08 01:03:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0304 0 normal SHIPPED_LIVE Updated kernel packages available for Red Hat Enterprise Linux 4 Update 5 2007-04-28 18:58:50 UTC

Description John Newbigin 2006-03-29 00:43:23 UTC
Description of problem:
When a subdirectory is listed, the directory is shown as a child of it's self. 
None of the correct entries are show.

Version-Release number of selected component (if applicable):
2.6.9-34.EL

How reproducible:
Every time

Steps to Reproduce:
1. Mount a cifs share
mount -t cifs \\\\linuxserver\\testuser -o username=testuser
2. Change into a directory
cd testing
3. Do a directory listing
ls
  
Actual results:
[root@testbox testuser]# cd testing
[root@testbox testing]# ls -la
ls: testing: No such file or directory
total 1024
drwxr-xr-x  2 testuser testuser 0 Mar 22 18:01 testing
[root@testbox testing]# ls
testing


Expected results:
[testuser@linuxserver testuser]$ cd testing
[testuser@linuxserver testing]# ls -la
total 8
drwxr-xr-x    2 testuser testuser     4096 Mar 29 11:42 .
drwx------   43 testuser testuser     4096 Mar 29 11:42 ..
-rw-r--r--    1 testuser testuser        0 Mar 29 11:42 testfile


Additional info:
If you access a file directly it works.
Directory listings work in cifs 1.34a.  I have built that version manually as a
workaround.

Comment 1 John Newbigin 2006-03-29 00:53:52 UTC
The mount command also needs a target directory:
mount -t cifs \\\\linuxserver\\testuser -o username=testuser /mnt/cifstest


Comment 2 Jason Baron 2006-03-29 15:38:35 UTC
hmmm. i'm a little confused b/c 2.6.9-34 include cifs version 1.34a

Comment 3 John Newbigin 2006-03-29 23:56:25 UTC
I am getting confused with version numbers.  It is cifs version 1.40a(RHEL) that
I am using (though I think I have used 1.34 in the past).


Comment 4 John Newbigin 2006-06-26 01:24:01 UTC
I have confirmed this problem is still present in kernel 2.6.9-34.0.1.EL

The red hat version of cifs (1.34) does not list directories correctly, a self
compiled version of cifs
(http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.40a-forFC3orRHEL4orSuSEWrk9.tar.gz)
does.

The problem is that ls shows the wrong file names.  The real files do exist and
stat works on the real files, but ls is told the wrong names so the user sees
the wrong names, and ls can not stat the files (because they don't exist, and
hence the error 'No such file or directory')

Example of problem:
[test@el4 ~]$ cd testing/
[test@el4 testing]$ ls
testing
[test@el4 testing]$ stat testing
stat: cannot stat `testing': No such file or directory
[test@el4 testing]$ stat testfile
  File: `testfile'
  Size: 15              Blocks: 2048       IO Block: 16384  regular file
Device: 10h/16d Inode: 228890      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 6860/  test)   Gid: ( 1000/     test)
Access: 2006-03-29 12:42:08.000000000 +1100
Modify: 2006-06-26 11:24:29.000000000 +1000
Change: 2006-06-26 11:24:29.000000000 +1000

Example of correct results, using 1.40a:
[test@el4 ~]$ cd testing/
[test@el4 testing]$ ls
a  A  lower  testfile  UPPER
[test@el4 testing]$ stat testfile
  File: `testfile'
  Size: 15              Blocks: 2048       IO Block: 16384  regular file
Device: 10h/16d Inode: 8492        Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 6860/  test)   Gid: ( 1000/     test)
Access: 2006-03-29 12:42:08.000000000 +1100
Modify: 2006-06-26 11:24:29.000000000 +1000
Change: 2006-06-26 11:24:29.000000000 +1000
[test@el4 testing]$

Comment 5 Jason Baron 2006-09-14 16:07:02 UTC
committed in stream U5 build 42.10. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/


Comment 6 John Newbigin 2006-09-18 03:10:33 UTC
I am testing 42.11 which so far is working well.

Comment 7 RHEL Program Management 2006-09-27 22:42:13 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 Jay Turner 2006-10-03 13:19:31 UTC
QE ack for 4.5.

Comment 12 Red Hat Bugzilla 2007-05-08 01:03:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0304.html


Note You need to log in before you can comment on or make changes to this bug.