• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1663
  • Last Modified:

problem reading CIFS mount

Hi,

I successfully mounted Windows 2003 to Linux FC-4 (using kernel 2.6.16.1) using CIFS but strangest
thing happened, I could write and delete but I could NOT read!!!  It gave me "Permission denied".
So I went back to Windows 2003 server and checked the shared directory permission and security.
I have it set to Full Control for Everyone (basically, everyone can r/w access to it).

I use autofs to mount this CIFS but it doesn't matter, I also try manual mount.  Here is my autofs
file "auto.server" :

# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
scratch     -fstype=cifs,rw,credentials=/root/.credentials  ://w2ksvr/Scratch

I also try

mount.cifs //w2ksvr/Scratch /mnt -o user=xxx,password=xxx

Both were successful but could not read.  Is there anything else I need here?

I look at the menuconfig and here is what I have.

<M> MSDOS fs support
<M> VFAT (Windows-95) fs support
(437) Default codepage for FAT
(ascii) Default iocharset for FAT
<M> NTFS file system support
[ ]   NTFS debugging support
[*]   NTFS write support

Any suggestion is appreciated.

Thanks,
Adisorn.
0
aermongk
Asked:
aermongk
  • 5
  • 4
  • 3
2 Solutions
 
aermongkAuthor Commented:
Oops!! sorry for the mess.  I cut and paste from "make menuconfig".  The &#9472; is a border.
0
 
rindiCommented:
Do you have a GUI installed on the FC4 Box? If so, can you try one of the included "filemanagers" (I like konqueror or krusader, but gnome should also have some that will work). Just enter smb://username@w2ksvr/scratch in the addressbar. Can you browse the w2k box then?
0
 
aermongkAuthor Commented:
Hi Rindi,

Yes, I can read from GUI gnome.  But most of the time, I'll be using command line.
Is there parameter I have to add to auto.server to make it work?  I looked
at man page on mount.cifs, how about uid, gid, file_mode, etc.   Does the Windows 2003
support CIFS Unix extension?  

Thanks,
Adisorn.
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
rindiCommented:
I usually mount windows 2003 shares on linux the following way:

mount -t cifs -o username=NameOfUser //IPOfServer/ShareName /mnt/MountPoint1

and that usually works. Of course I need to be root to mount, and the mountpoint has to exist. Maybe you have some "funny" Samba Client version, run yum update to update your FC4 box, or go up to FC5.
0
 
aermongkAuthor Commented:
BTW, I am currently using latest Kernel 2.6.16.1 (same as FC-5).

It seems that there is a fix for this problem but has not released yet.
I guess if anyone uses FC-4 or FC-5, they won't be able to read
Windows 2003 through CIFS.

Here is the thread I found.

http://www.redhat.com/archives/rhl-list/2006-April/msg03239.html

Hopefully, the kernel.org should release this soon.

Thanks anyway,
Adisorn.
0
 
NopiusCommented:
Kernel version 2.6.16-15 is the latest.
0
 
NopiusCommented:
FYI: http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.16.6
This bug was fixed only in 2.6.16-6:

commit dea8e11ab727c4c7d75d391354eab355cd74e95a
Author: Steve French <sfrench@us.ibm.com>
Date:   Fri Mar 31 21:22:00 2006 +0000

    [PATCH] Incorrect signature sent on SMB Read
   
    Fixes Samba bug 3621 and kernel.org bug 6147
   
    For servers which require SMB/CIFS packet signing, we were sending the
    wrong signature (all zeros) on SMB Read request.  The new cifs routine
    to do signatures across an iovec was not complete - and SMB Read, unlike
    the new SMBWrite2, did not fall back to the older routine (ie use
    SendReceive vs. the more efficient SendReceive2 ie used the older
    cifs_sign_smb vs. the disabled  cifs_sign_smb2) for calculating signatures.
   
    This finishes up cifs_sign_smb2/cifs_calc_signature2 so that the callers
    of SendReceive2 can get SMB/CIFS packet signatures.
   
    Now that cifs_sign_smb2 is supported, we could start using it in
    the write path but this smaller fix does not include the change
    to use SMBWrite2 when signatures are required (which when enabled
    will make more Writes more efficient and alloc less memory).
    Currently Write2 is only used when signatures are not
    required at the moment but after more testing we will enable
    that as well).
   
    Thanks to James Slepicka and Sam Flory for initial investigation.
   
    Signed-off-by: Steve French <sfrench@us.ibm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
0
 
rindiCommented:
yum update (or using up2date) should update the kernel.
0
 
NopiusCommented:
GranMod, there is a solution for this problem.
aermongk has kernel version 2.6.16.1 which is not current. Bug was fixed in 2.6.16.6.
And the most recent kernel stable version 2.6.16.15, which is recommended.
0
 
rindiCommented:
And I suggested updating, which also gets the latest kernels.
0
 
aermongkAuthor Commented:
Thank you for the pointer.  I have downloaded 2.6.16.15 and it has the fix in it.

Adisorn.
0
 
aermongkAuthor Commented:
Hi GranMod,

The solution comes after I have posted for the deletion.  Please ignore my post
in the Community Support.  I have accepted the answers.

Thanks,
Adisorn.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now