From owner-freebsd-questions@FreeBSD.ORG Mon Mar 28 13:18:26 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85DBD16A4CE for ; Mon, 28 Mar 2005 13:18:26 +0000 (GMT) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3077943D1F for ; Mon, 28 Mar 2005 13:18:25 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 2790 invoked from network); 28 Mar 2005 13:18:22 -0000 Received: from unknown (HELO localhost) ([pbs]775067@[83.129.7.250]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 28 Mar 2005 13:18:22 -0000 Date: Mon, 28 Mar 2005 15:17:57 +0200 From: Fabian Keil To: Alejandro Pulver Message-ID: <20050328151757.2cbc1410@localhost> In-Reply-To: <20050327153235.3cc8ae7f@ale.varnet.bsd> References: <20050326122909.06ed9062@ale.varnet.bsd> <20050326203751.3e5da8b8@localhost> <20050326174431.36f6021e@ale.varnet.bsd> <20050327110244.2c9a3be0@localhost> <20050327153235.3cc8ae7f@ale.varnet.bsd> X-Mailer: Sylpheed-Claws 1.0.1 (GTK+ 1.2.10; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions Subject: Re: Samba problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 13:18:26 -0000 Alejandro Pulver wrote: > On Sun, 27 Mar 2005 11:02:44 +0200 > Fabian Keil wrote: > > > Alejandro Pulver wrote: > > > > > On Sat, 26 Mar 2005 20:37:51 +0100 > > > Fabian Keil wrote: > > > > > > > Alejandro Pulver wrote: > > > > > > > > > I am using FreeBSD 5.3 with Samba 3.0.7,1. > > > > > > > > > > I can read all files from a Windows 2000 Pro. But when > > > > > I try to access a mount point that is an NTFS filesystem, I have > > > > > no read permission (files and directories appear as zero length > > > > > files) until I access them from the server machine (like doing > > > > > an 'ls'). > > > > > > > > > > My configuration file is as follows: > > > > > > > > > > ===== BEGIN ===== > > > > > # Samba config file created using SWAT > > > > > # from 127.0.0.1 (127.0.0.1) > > > > > # Date: 2004/12/11 19:24:02 > > > > > > > > > > # Global parameters > > > > > [global] > > > > > workgroup = VARNET > > > > > server string = FreeBSD 5.3 > > > > > security = SHARE > > > > > log file = /var/log/samba/log.%m > > > > > max log size = 50 > > > > > dns proxy = No > > > > > > > > > > [mnt] > > > > > comment = Mounted Filesystems > > > > > path = /mnt > > > > > guest ok = Yes > > > > > > > > > > [printers] > > > > > comment = All Printers > > > > > path = /var/spool/samba > > > > > printable = Yes > > > > > browseable = No > > > > > > > > > > [ale] > > > > > comment = Ale's Home DIrectory > > > > > path = /home/ale > > > > > guest ok = Yes > > > > > ===== END ======= > > > > > > > > > > Note: I have subdirectories under '/mnt' like 'w2k', 'wxp', > > > > > 'cam', and'tmp'. > > > > > > > > > > What am I doing wrong? > > > > > > > > Who owns the subdirectories and who is your guest user? > > > > > My guest user is 'nobody', but I also tried with 'ale' and 'root' > > > (wich owns the mount point). > > > > Did you see in samba's log that the guest user was changed? > > How did you change it, with "guest user" or with "force user"? > > > > As your problem can be reproduced, increasing samba's debug > > level might help. Samba should log why read access was denied. > > > > If you access the samba share with mount_smbfs, do you see > > the same behavior? > > > > > The directory '/mnt/w2k' is owned by 'root' and the group 'wheel', > > > the permissions are rwxr-xr-x. > I saw in SWAT that the connection from the other machine was mapped to > the desired local user in all cases (I tried "nobody", "ale" and > "root"). I used "guest account = ". > > Something strange is happening: I can access the sahre '/mnt' (and > 'w2k') with 'smbclient' (using the 'guest' user), but if I do it with > 'mount_smbfs //guest@ale/mnt /home/ale/tmp' then the problem appears, > even with 'root' (I can not see/access entries until I list them with > any user from '/mnt/w2k'). > > I think the problem is with Samba, not 'mount_smbfs'. > > This message appears (many times) in debug level 0: > > [2005/03/27 15:04:38, 1] smbd/service.c:make_connection_snum(648) > mariana (192.168.1.1) connect to service mnt initially as user nobody > (uid=65534, gid=65534) (pid 1217)[2005/03/27 15:04:44, 0] > locking/posix.c:posix_fcntl_lock(657) posix_fcntl_lock: WARNING: lock > request at offset 0, length 4096 returned[2005/03/27 15:04:44, 0] > locking/posix.c:posix_fcntl_lock(658) an Invalid argument error. This > can happen when using 64 bit lock offsets[2005/03/27 15:04:44, 0] > locking/posix.c:posix_fcntl_lock(659) on 32 bit NFS mounted file > systems. > > The other message I noticed (but I think it is not an error) in level 3 > is: > > [2005/03/27 14:16:19, 2] auth/auth.c:check_ntlm_password(312) > check_ntlm_password: Authentication for user [nobody] -> [nobody] > FAILED with error NT_STATUS_WRONG_PASSWORD[2005/03/27 14:16:19, 3] > auth/auth.c:check_ntlm_password(219) check_ntlm_password: Checking > password for unmapped user [VARNET]\[nobody]@[mariana] with the new > password interface[2005/03/27 14:16:19, 3] > auth/auth.c:check_ntlm_password(222) check_ntlm_password: mapped user > is: [ALE]\[nobody]@[mariana] > > The one that also called my attention was: > > [2005/03/27 14:16:30, 3] smbd/error.c:error_packet(105) > error string = Is a directory > [2005/03/27 14:16:30, 3] smbd/error.c:error_packet(129) > error packet at smbd/nttrans.c(862) cmd=162 (SMBntcreateX) > NT_STATUS_FILE_IS_A_DIRECTORY > > However I do not know about the internal working of Samba so perhaps I > missed some important messages. > > I made different logs with different debug levels. They are in > ftp://ftp.varnet.to (public FTP) in a directory called "samba_logs". The > local machine is called "ale" and the other "mariana". The best log in > level 3 is in the directory "log.3_2". Today I tried your smb.conf and it worked as well as mine. I had a look at you logs, but didn't get more information out of them than you did. I get lock offset warnings as well, so they don't seem to be the problem. Perhaps you should ask on a samba list again. Fabian -- http://www.fabiankeil.de