Neil Aggarwal | 1 Nov 06:21 2004

RE: Mounting CIFS gives me permission denied

Steve:
 
It has been a while since I sent you the tcpdump.
Any progress?
 
Is there anything that I can do to help you?
I would like to get this problem resolved.
 
Thanks,
    Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com

-----Original Message-----
From: linux-cifs-client-bounces+neil=jammconsulting.com <at> lists.samba.org [mailto:linux-cifs-client-bounces+neil=jammconsulting.com <at> lists.samba.org] On Behalf Of Steven French
Sent: Sunday, October 17, 2004 9:48 PM
To: Neil Aggarwal
Cc: linux-cifs-client <at> lists.samba.org
Subject: RE: [linux-cifs-client] Mounting CIFS gives me permission denied


Can you get a tcpdump or ethereal trace of the mount and send the binary trace file?


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client <at> lists.samba.org
http://lists.samba.org/mailman/listinfo/linux-cifs-client
Joe | 1 Nov 23:41 2004

Re: [Samba] cifs problems with multiple linux boxes hitting W2K shares, cifs-1.20c-2.4, linux 2.4.27 kernel


First of all - thanks to the cifs developers!

We have 2 load balanced web servers behind a firewall.
Each of these servers has 5 W2K shares mounted for access by apache.
When I tried to convert all of those mounts from smbfs to cifs on port 445
the mounts became unstable. And apache caused a kernel oops and I had to
reboot - a couple of times while I was working on this. I had run one
of the machines using cifs mounts fine for 1 week before trying the other.
Then - ouch........

Today, I finished converting all of the smbfs mounts on the machines to
cifs. I had all but the busiest 2 mounts converted as of Friday. I had to
stop apache to umount those.

I used port 139 as suggested by Steve French. I'd like to know why port
445 doesn't work. Perhaps it would if the domain was specified. But I've
crashed the production machines enough already and don't want to try that
again. Because we have 2 load balanced servers and use lvs and mon to
access them, hundreds of library staff and thousands of users didn't know
I was having problems and crashing the machines. I plan to leave things
alone for now.....

The mounts look like they are working fine. No CIFS errors. Lots of files
are being accessed via apache and I did simultaneous listings and copies
of a mounted image directory (~2500 files, ~270MB) to the machines. When
I had major problems the last times that I tried the conversion, the
problems showed up immediately. A couple of times the machines went down
before I could react.

* findings
 - when cifs was called out to run on port 445 on both machines it blew up
 - specifying port 139 on both machines appears to work - although one
   of them seems to be using port 445 (according to netstat)
 - specifying the domain in the credentials file (user <at> LIB.UW.EDU) doesn't
   work consistantly, I included it as a mount option
 - a working fstab entry: //server.lib.uw.edu/webshare /mnt/web cifs \
    ro,credentials=/usr/local/etc/cifs.cred,port=139, \
    file_mode=0444,dir_mode=0555,rsize=8192,domain=LIB.UW.EDU 0 0
 - to be determined

Joe
UW Libraries

Hein-Pieter van Braam | 2 Nov 00:49 2004

lstat always reporting nlink of 1

hi all!

I've been experimenting with using a samba share as a homedirectory for a 
linux workstation, with nfs security being what it is etc, it seemed the best 
solution for now. This is a production network, and I don't want anyone with 
a knoppix cd and some patience to be able to connect to my user's home 
directories :) nfsv4 with kerberos suppor is to painful at this point, and 
isn't quite ready for prima-time... 

Well, chaos ensued after I got pam_mount to run, mozilla wouldn't run, kde 
wouldn't start etc. This was rather frustrating. So I checked all the 
settings for my samba server and confirmed that, everything should be in 
order. and I can do whatever I want on this share as if it was a "real" 
unix-like filesystem (ln, mkfifo mknod etc)

I've tracked this down to (what seems to be) one single problem: an lstat() on 
a smb/cifs mounted volume will always give an nlink value of 1 weither or not 
there are links to that file or not.

This is significant because kde for instance uses the nlink value to determine 
weither or not a lockfile is stale or something, I don't quite understand why 
it does what it does, but I do understand what it does. 

If someone wants to check the code out, its in kdelibs/kdecore/klockfile.cpp 
around line 144 (KLockFile::LockResult deleteStaleLock)

because the nlink value is 1 and kde expects it to be (rightly so) 2 or more, 
kde won't start, and according to a bunch of straces I did on mozilla it does 
the same thing.

I would really appreciate it if someone could tell me weither this problem is 
because of the cifs client or samba itself. Some pointers as to where to 
begin fixing this would be nice too!

thanks in advance!

Hein-Pieter van Braam.

PS: I have confirmed this behaviour with a very simple php script (was the 
fastest thing I could dream up at that moment) and that shows the same 
output.
Hein-Pieter van Braam | 2 Nov 04:46 2004

Re: lstat reporting different inode numbers on smb than it does on other filesystems

OK, I've solved that bit, for some reason after updating my cifs client this 
problem went away, sorry for bothering you, but: alas, the problems don't end 
there. 

lstat also reports different inode numbers over smb than it does over a local 
filesystem.

on ext2/3 and friends, the inod numbers in an lstat are the same for both the 
source and the destination of a hardlink, on cifs, it gets its own inode 
number, that is then passed. 

I've verified this with PHP and by adding some debug information to kdelibs, 
and both confirm that the inode numbers do not correspond.

This leaves me basically in the same spot that I was before, with the KDE 
locking stuff, (mozilla and friends are working now)

I have absolutly verified that I cannot fix this with a newer version of 
cifs-client :)

I'm now building a kdelibs that disables the check for the inode numbers, but 
I don't think that's a good permanent solution, basically, the question is 
still the same :)

what should I look for to fix it? samba or the cifs client?

sorry for repying to myself etc. this must look rather stupid.

greetings,

Hein-Pieter van Braam

On Tuesday 02 November 2004 00:49, Hein-Pieter van Braam wrote:
> hi all!
>
> I've been experimenting with using a samba share as a homedirectory for a
> linux workstation, with nfs security being what it is etc, it seemed the
> best solution for now. This is a production network, and I don't want
> anyone with a knoppix cd and some patience to be able to connect to my
> user's home directories :) nfsv4 with kerberos suppor is to painful at this
> point, and isn't quite ready for prima-time...
>
> Well, chaos ensued after I got pam_mount to run, mozilla wouldn't run, kde
> wouldn't start etc. This was rather frustrating. So I checked all the
> settings for my samba server and confirmed that, everything should be in
> order. and I can do whatever I want on this share as if it was a "real"
> unix-like filesystem (ln, mkfifo mknod etc)
>
> I've tracked this down to (what seems to be) one single problem: an lstat()
> on a smb/cifs mounted volume will always give an nlink value of 1 weither
> or not there are links to that file or not.
>
> This is significant because kde for instance uses the nlink value to
> determine weither or not a lockfile is stale or something, I don't quite
> understand why it does what it does, but I do understand what it does.
>
> If someone wants to check the code out, its in
> kdelibs/kdecore/klockfile.cpp around line 144 (KLockFile::LockResult
> deleteStaleLock)
>
> because the nlink value is 1 and kde expects it to be (rightly so) 2 or
> more, kde won't start, and according to a bunch of straces I did on mozilla
> it does the same thing.
>
> I would really appreciate it if someone could tell me weither this problem
> is because of the cifs client or samba itself. Some pointers as to where to
> begin fixing this would be nice too!
>
> thanks in advance!
>
> Hein-Pieter van Braam.
>
> PS: I have confirmed this behaviour with a very simple php script (was the
> fastest thing I could dream up at that moment) and that shows the same
> output.
> _______________________________________________
> linux-cifs-client mailing list
> linux-cifs-client <at> lists.samba.org
> http://lists.samba.org/mailman/listinfo/linux-cifs-client
Steven French | 2 Nov 19:10 2004
Picon

Re: lstat reporting different inode numbers on smb than it does on other filesystems


> on ext2/3 and friends, the inod numbers in an lstat are the same for both the
>source and the destination of a hardlink, on cifs, it gets its own inode
>number, that is then passed.

I can use the inode number from the server, but I risk inode number collisions if the server exports two mounted filesystems under the same share.

If you would like I can send you a patch to use the server's inode number, but it would probably be best to make that optional (a mount parm or /proc/fs/cifs config file).



Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client <at> lists.samba.org
http://lists.samba.org/mailman/listinfo/linux-cifs-client
Leucht, Axel | 3 Nov 16:45 2004
Picon

panic: internal error

Hello,

I'm currently having problems with PCs transferring files onto a Linux-box (Suse 8.2) with a Samba share (2.2.2.8a).

Whenever some clients under Windows try to copy some files onto the Linux-box via a Samba-share it often
fails and in the log.smbd errors do occur:
*	Internal error: signal 11 in pid <pid> (2.2.8a-SuSE)
*	PANIC: Internal error

Does anybody can shed some light on this problem?

BTW, all machines are within the same network and there are no firewalls in between.

Mit freundlichen Grüßen 
Axel Leucht                       Phone: +49-231-9792-251 
PRO DV Software AG  FAX:   +49-231-9792-200 
Hauert 6            <mailto:Axel.Leucht <at> prodv.de> 
44227 Dortmund      <http://www.prodv.de> 
Hein-Pieter van Braam | 3 Nov 18:24 2004

Re: lstat reporting different inode numbers on smb than it does on other filesystems

Hi steve!

I would love to take al look at that patch! in our envionment this isn't an 
issue anyway. I myself was thinking about maybe when passing this 
information, ceck weither or not a file is a link, and if it is, set the ino 
the same as the target?
I think that would fix inode collisions, I am not very sure if this is 
feasable though, and it might bog down the speed of stat... 

I think the best way to implement this would be with a mount parm, as you will 
very probably *only* need this baviour if you use the share as a home 
directory. (at least, I haven't found any other way to trigger an error based 
on this behaviour)

greeting!

Hein-Pieter van Braam

On Tuesday 02 November 2004 19:10, you wrote:
> > on ext2/3 and friends, the inod numbers in an lstat are the same for
>
> both the
>
> >source and the destination of a hardlink, on cifs, it gets its own inode
> >number, that is then passed.
>
> I can use the inode number from the server, but I risk inode number
> collisions if the server exports two mounted filesystems under the same
> share.
>
> If you would like I can send you a patch to use the server's inode number,
> but it would probably be best to make that optional (a mount parm or
> /proc/fs/cifs config file).
>
>
>
> Steve French
> Senior Software Engineer
> Linux Technology Center - IBM Austin
> phone: 512-838-2294
> email: sfrench at-sign us dot ibm dot com
Steven French | 3 Nov 19:26 2004
Picon

Re: panic: internal error


Reposting your question to samba-technical mailing list as it appears to be a Linux/Samba server not client issue as you describe it.    You might try increasing the servers log level or running an ethereal network trace - so you can see what the last request sent from the Windows client - which would help narrow this down in smbd


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com



Hello,

I'm currently having problems with PCs transferring files onto a Linux-box (Suse 8.2) with a Samba share (2.2.2.8a).

Whenever some clients under Windows try to copy some files onto the Linux-box via a Samba-share it often fails and in the log.smbd errors do occur:
*                 Internal error: signal 11 in pid <pid> (2.2.8a-SuSE)
*                 PANIC: Internal error

Does anybody can shed some light on this problem?

BTW, all machines are within the same network and there are no firewalls in between.

Mit freundlichen Grüßen
Axel Leucht                       Phone: +49-231-9792-251
PRO DV Software AG  FAX:   +49-231-9792-200
Hauert 6            <mailto:Axel.Leucht <at> prodv.de>
44227 Dortmund      <http://www.prodv.de>


_______________________________________________
linux-cifs-client mailing list
linux-cifs-client <at> lists.samba.org
http://lists.samba.org/mailman/listinfo/linux-cifs-client

_______________________________________________
linux-cifs-client mailing list
linux-cifs-client <at> lists.samba.org
http://lists.samba.org/mailman/listinfo/linux-cifs-client
David Wuertele | 3 Nov 22:06 2004

Re: Fw: patch for properly converting Japanese et al to utf8

Steven> I have not posted a newer version of the readdir code yet
Steven> because it needs more work still.  I do expect to post it this
Steven> week though.

What is the status of cifs_readdir?  I'd like to test it when your
work gets checked in.

Dave
Steven French | 4 Nov 17:11 2004
Picon

Re: Problem starting KDE on CIFS home directories


This may be similar to an already report problem (reported on linux-cifs, but probably something a user should open a bugzilla.samba.org defect on) about (optionally) getting inode numbers from the server, and there is also a reported problem with the directory change notify fcntl (F_NOTIFY) on cifs vfs which kde invokes and might be an issue on standard 2.6.8 and later kernels due to a sideeffect of a global change which enabled some ifdef cifs code.


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client <at> lists.samba.org
http://lists.samba.org/mailman/listinfo/linux-cifs-client

Gmane