Date: Sun, 27 Mar 2005 15:32:35 -0300 From: Alejandro Pulver <alejandro@varnet.biz> To: Fabian Keil <freebsd-listen@fabiankeil.de> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: Samba problems Message-ID: <20050327153235.3cc8ae7f@ale.varnet.bsd> In-Reply-To: <20050327110244.2c9a3be0@localhost> References: <20050326122909.06ed9062@ale.varnet.bsd> <20050326203751.3e5da8b8@localhost> <20050326174431.36f6021e@ale.varnet.bsd> <20050327110244.2c9a3be0@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 27 Mar 2005 11:02:44 +0200 Fabian Keil <freebsd-listen@fabiankeil.de> wrote: > Alejandro Pulver <alejandro@varnet.biz> wrote: > > > On Sat, 26 Mar 2005 20:37:51 +0100 > > Fabian Keil <freebsd-listen@fabiankeil.de> wrote: > > > > > Alejandro Pulver <alejandro@varnet.biz> 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. > > If you only want read access, this looks fine. > > Fabian > -- > http://www.fabiankeil.de > Hello, Thank you for your reply. 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 = <user>". 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". Thanks and Best Regards, Ale
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050327153235.3cc8ae7f>