Igor Chudov | 2 Oct 2006 17:19

SAMBA no longer works (FC5 to FC5): READ op. FAILS

I had a directory that was samba shared, from a server that runs FC5 to
a client (laptop) that runs FC5 also. 

Everything worked (except when SAMBA became CIFS, anonymous logons
stopped working), it was a read only share.

Starting from a few days ago, it no longer works. I can still get
directory listings, mount the "shared drive", etc, however, when I
actually read the file (with cat, wc, mplayer etc) I get a strange
"permission denied" error. That happens even though the perms are all
good looking, I still cannot read. I think that I can open the file
descriptor for reading, but the actual read operation fails. 

After a while of frustration, I ditched SAMBA entirely and switched to
NFS, but I would like to know just what could have happened?

(we have one dinky MS Windows computer at home, that we do not run a
lot, but it would be nice to have samba available, though it is not
hugely important). 

i
Jelmer Vernooij | 2 Oct 2006 18:02
Picon
Favicon

Kerberos support

Hi Steve,

Can you please summarize what needs to be done in order to get Kerberos
support in the CIFS vfs ? I'm interested in helping out but I'm not
really sure in which areas I could help.

Cheers,

Jelmer
--

-- 
Jelmer Vernooij <jelmer <at> samba.org> - http://samba.org/~jelmer/
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client <at> lists.samba.org
https://lists.samba.org/mailman/listinfo/linux-cifs-client
Hari Sekhon | 3 Oct 2006 11:46

CIFS VFS: No writable handles for inode

When mounting a share from another samba server 3.22 from another linux 
machine I got the following over and over again in my logs until I 
unmounted it

CIFS VFS: No writable handles for inode

I wrote a file, then left it idle for a while and this still kept coming 
out in the logs when the connection was idle.

The kernel is a 2.6.16-gentoo-r12 on the mount -t cifs machine and a 
2.6.17-gentoo-r7 on the samba server machine.

Any Ideas?

-h

--

-- 
Hari Sekhon
Q | 3 Oct 2006 12:28
Picon

Re: DFS support in CIFS

Steve French wrote:
> Q wrote:
>> Steve French wrote:
>>>> Currently I'm writing DFS support in cifs kernel module
>>>> At current state I can work read/write/list files in DFS shares and 
>>>> so on.
>>>> Only two big things hasn't been done:
>>>
>>> 2. not enough knowledge to do propper cleanup when cleaning nested 
>>> trees, module crashes on 'rmmod cifs'
>>>
>>> So, Does anybody know a way to accomplish 1 problem or any proposal how
>>>
>>> I had finished part of the code necessary for DFS a few years ago 
>>> (and they are in mainline) as you have probably noticed.
>>>
>>> CIFS code can recognize DFS referral, get the referral list - and for 
>>> referrals with server as ip address could probably work today with 
>>> small changes.  ip address based referrals are ok, although not common.
>>
>> Yes, What I've done is based on your code, just a little rewriting, 
>> fixing, copypasting :) and DFS works.
>>
>>>
>>>> 1. resolving server names to ip in kernel space
>>> I think the easiest approach for kernels 2.6.12 or later will be to 
>>> define a key type (keyed on hostname) for the upcall and use the
>>> key management api to return the ip address (see 
>>> Documentation/keys.txt etc and Dave Howells web page at RedHat).  
>>> Most other
(Continue reading)

Steve French | 3 Oct 2006 21:23
Picon
Favicon

Re: CIFS VFS: No writable handles for inode

> When mounting a share from another samba server 3.22 from another linux 
> machine I got the following over and over again in my logs until I 
> unmounted it
>
> CIFS VFS: No writable handles for inode
>
> I wrote a file, then left it idle for a while and this still kept coming 
> out in 

That would indicate that the file was closed while it still had dirty pages,
which does not sound likely unless the server or network connection temporarily
crashed and we were not able to reconnect - and even that sounds unlikely in 
your scenario.

In fs/cifs/file.c it would be helpful to change the following (and rebuild/reload cifs.ko)
                        open_file = find_writable_file(CIFS_I(mapping->host));
                        if (!open_file) {
                                cERROR(1, ("No writable handles for inode"));
                                rc = -EBADF;
                        } else {

to
		
                        open_file = find_writable_file(CIFS_I(mapping->host));
                        if (!open_file) {
				dump_stack();
                                cERROR(1, ("No writable handles for inode"));
                                rc = -EBADF;
                        } else {

(Continue reading)

Steve French | 3 Oct 2006 21:34
Picon
Favicon

Re: SAMBA no longer works (FC5 to FC5): READ op.

> Everything worked (except when SAMBA became CIFS, anonymous logons
> stopped working), it was a read only share.
Can you explain this more?  Do you mean mounts with an empty userid:
	userid=""
or
	guest  
which simply means that we don't prompt for the password, but use the userid 
specified on the mount (or the default).

Earlier (presumably with smbfs) how were you specifying anonymous?

> Starting from a few days ago, it no longer works. I can still get
> directory listings, mount the "shared drive", etc, however, when I
> actually read the file (with cat, wc, mplayer etc) I get a strange
> "permission denied" error. That happens even though the perms are all
> good looking, I still cannot read. I think that I can open the file
> descriptor for reading, but the actual read operation fails. 
It looks like a known server bug introduced with Samba 3.0.23a and then
fixed by Samba 3.0.23c (perhaps even earlier). The following e.g. should
be ok:

http://mirror.linux.duke.edu/pub/fedora/linux/core/updates/5/i386/samba-3.0.23c-1.fc5.i386.rpm

> After a while of frustration, I ditched SAMBA entirely and switched to
> NFS, but I would like to know just what could have happened?
>
>(we have one dinky MS Windows computer at home, that we do not run a
>lot, but it would be nice to have samba available, though it is not
> hugely important)

(Continue reading)

Schultz, Dale C. | 4 Oct 2006 14:34
Picon

cifs client 1.45 for 2.4.x missing directory listings

Further to my last email…I enabled the cifsFYI and captured some stuff I don’t really understand but I compared it to a server running a 2.6 kernel and CIFS 1.45.  In the comparison I discovered that the CIFS module on the 2.4 kernel system was not the newly complied 1.45 version but the old 1.20c one.  I rebooted the server with the new module in place and found it would not load.  I decided to go through the whole exercise of re-compiling the kernel and the modules as the CIFS module was complaining about unresolved symbols.  After the recompile and installation of the new kernel and the modules, Im happy to report that CIFS 1.45 is working on my 2.4 kernel machine.

(Apparently I was an operator in error)

Dale

_______________________________________________
linux-cifs-client mailing list
linux-cifs-client <at> lists.samba.org
https://lists.samba.org/mailman/listinfo/linux-cifs-client
Ronald Cortbauwi | 5 Oct 2006 08:50

(no subject)

> Currently I'm writing DFS support in cifs kernel module
> At current state I can work read/write/list files in DFS shares and so on.
> Only two big things hasn't been done:


2. not enough knowledge to do propper cleanup when cleaning nested
trees, module crashes on 'rmmod cifs'

So, Does anybody know a way to accomplish 1 problem or any proposal how


I had finished part of the code necessary for DFS a few years ago (and
they are in mainline) as you have probably noticed.

CIFS code can recognize DFS referral, get the referral list - and for
referrals with server as ip address could probably work today with small
changes. ip address based referrals are ok, although not common.


> 1. resolving server names to ip in kernel space

I think the easiest approach for kernels 2.6.12 or later will be to define a key type (keyed on hostname) for the upcall and use the
key management api to return the ip address (see Documentation/keys.txt etc and Dave Howells web page at RedHat). Most other
upcall possibilities (captive ioctl, cn.ko, or worse netlink, or pseudo-fs require a long running daemon which is
probably not ideal, and also have some problems with reliability). This should probably not be a cifs specific key type
but cifs would be the first user of it.


>2. not enough knowledge to do propper cleanup when cleaning nested
> trees, module crashes on 'rmmod cifs'

There may be a way to do this with explicit mounts from a daemon in userspace (I hope we can avoid this) but surely this
is something the automounter deals with. Again the key request api (with a null, noncached key - passing as description
the mountparms you want to issue?) might work. An alternative if mount in kernel could be to attached a list of the
"sub-mounts" (implicit dfs mounts) off the CIFS_SB (cifs specific portion of the superblock).

 

 


Ronald Cortbawi
IT Developer
EVER ME

( Office: +961-1-513531

6 Fax: +961-1-513534

* Email: Ronaldc <at> ever-me.com

Web Site: www.ever-me.com

 

"This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient. If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that EVER ME or its subsidiaries and associated companies, are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of EVER ME before opening any attachments please check them for viruses and defects."

 

_______________________________________________
linux-cifs-client mailing list
linux-cifs-client <at> lists.samba.org
https://lists.samba.org/mailman/listinfo/linux-cifs-client
Nicolas Schmitz | 13 Oct 2006 10:28
Picon
Favicon

mount error 5 with cifs, ok with smbfs

Hi,
when I try to mount a windows share, I get a
mount error 5 = Input/output error
and in dmesg :
CIFS VFS: cifs_mount failed w/return code = -5

The windows version is 2000SP4, samba is 3.0.22, and kernel 
2.6.8-11-amd64. It works with smbfs.

We use cifs with more than 30 other computers without problem.

I have read
http://lists.samba.org/archive/linux-cifs-client/2004-October/000452.html
and
http://archives.free.net.ph/message/20060818.214539.af71b9b5.en.html

It seems I'm not alone having this problem. Anyone has a working 
solution ? (except switching to smbfs:-( )

Thanks.

Nicolas Schmitz
Steve French | 13 Oct 2006 22:24
Picon
Favicon

Re: mount error 5 with cifs, ok with smbfs

> the Tree Connect is being sent, and the server replying with the
> NTSTATUS_DUPLICATE_NAME result code.

> How can a Tree_Connect command result in an
> NT_STATUS_DUPLICATE_NAME error?

fs/cifs/connect.c: UID = 2048
fs/cifs/connect.c: CIFS Session Established successfully
fs/cifs/connect.c: file mode: 0x7f7  dir mode: 0x1ff
fs/cifs/transport.c: For smb_command 117
fs/cifs/transport.c: Sending smb of length 80
| 0x00 0x00 0x00 0x50 0xff 0x53 0x4d 0x42  |  _ _ _ P ÿ S M B
| 0x75 0x00 0x00 0x00 0x00 0x00 0x01 0xc0  |  u _ _ _ _ _ _ À
| 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00  |  _ _ _ _ _ _ _ _
| 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x57  |  _ _ _ _ _ _ _ W
| 0x00 0x08 0xfd 0x30 0x04 0xff 0x00 0x00  |  _ _ ý 0 _ ÿ _ _
| 0x00 0x08 0x00 0x01 0x00 0x25 0x00 0x00  |  _ _ _ _ _ % _ _
| 0x5c 0x00 0x5c 0x00 0x70 0x00 0x63 0x00  |  \ _ \ _ p _ c _
| 0x2d 0x00 0x70 0x00 0x72 0x00 0x69 0x00  |  - _ p _ r _ i _
| 0x6e 0x00 0x63 0x00 0x65 0x00 0x5c 0x00  |  n _ c _ e _ \ _
| 0x43 0x00 0x24 0x00 0x00 0x00 0x3f 0x3f  |  C _ $ _ _ _ ? ?
| 0x3f 0x3f 0x3f 0x00                      |  ? ? ? _        
fs/cifs/connect.c: Peek length rcvd: 0x24 beginning 0x27)
| 0x00 0x00 0x00 0x23 0xff 0x53 0x4d 0x42  |  _ _ _ # ÿ S M B
| 0x75 0xbd 0x00 0x00 0xc0 0x80 0x01 0xc0  |  u ½ _ _ À _ _ À
| 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00  |  _ _ _ _ _ _ _ _
| 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x57  |  _ _ _ _ _ _ _ W
| 0x00 0x08 0xfd 0x30 0x00 0x00 0x00       |  _ _ ý 0 _ _ _  
fs/cifs/connect.c:  Mid 0x30fd matched - waking up
| 0x00 0x00 0x00 0x23 0xff 0x53 0x4d 0x42  |  _ _ _ # ÿ S M B
| 0x75 0xbd 0x00 0x00 0xc0 0x80 0x01 0xc0  |  u ½ _ _ À _ _ À
| 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00  |  _ _ _ _ _ _ _ _
| 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x57  |  _ _ _ _ _ _ _ W
| 0x00 0x08 0xfd 0x30 0x00 0x00 0x00 0x00  |  _ _ ý 0 _ _ _ _
| 0x00 0x08 0x00 0x01 0x00 0x25 0x00 0x00  |  _ _ _ _ _ % _ _
| 0x5c 0x00 0x5c 0x00 0x70 0x00 0x63 0x00  |  \ _ \ _ p _ c _
| 0x2d 0x00 0x70 0x00 0x72 0x00 0x69 0x00  |  - _ p _ r _ i _
| 0x6e 0x00 0x63 0x00 0x65 0x00 0x5c 0x00  |  n _ c _ e _ \ _
| 0x43 0x00 0x24 0x00 0x00 0x00 0x3f 0x3f  |  C _ $ _ _ _ ? ?
| 0x3f 0x3f 0x3f 0x00 0x00 0x00 0x00 0x00  |  ? ? ? _ _ _ _ _
| 0x00 0x00 0x00 0x00                      |  _ _ _ _        
Status code returned 0xc00000bd NT_STATUS_DUPLICATE_NAME
fs/cifs/netmisc.c:  !!Mapping smb error code 52 to POSIX err -5 !!
fs/cifs/connect.c: CIFS Tcon rc = -5
fs/cifs/cifssmb.c: In SMBLogoff for session disconnect


That is an interesting question - I think this could occur when the server
and or client is (mis)configured for a DNS name that does not match what
the server thinks its own DNS name is.

As alternatives, you might try
1) using the full qualified domain name on the mount (hostname.tcpdomain.com)
2) specifying the ip address instead of hostname on the mount (e.g. //9.3.4.5/c$ instead of //server/c$)
3) changing the hostname or netbiosname on the target computer to match
4) perhaps even would work if you tried port 139 (override the port with "port=139" mount option and override servername by using an rfc1001 netbiosname, ie specify on mount "servern=mynetbiosname")
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client <at> lists.samba.org
https://lists.samba.org/mailman/listinfo/linux-cifs-client

Gmane