[Samba] Re: smb.conf - fixed? :)

Chris Tooley ctooley at amoa.org
Wed Jul 17 14:23:02 GMT 2002


open("/usr/local/samba/var/log.smbd",
O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission
denied)
umask(0)                                = 022
brk(0x81e6000)                          = 0x81e6000
stat64("", 0xbfffed80)                  = -1 ENOENT (No such file or
directory)
umask(022)                              = 0

That "No such file or directory" is not good.  This definitely appears
to be an incorrect error message.  I'll see if I can figure out where
that's happening so we may be able to provide a patch instead of just a
bug report.

I've cc'd the samba mailing list as hopefully someone on that list will
have some insite.  Also attached is the strace.

For the Samba mailing list:

RedHat 7.2
Samba 2.2.5 compiled from scratch.  Located in /usr/local/samba
kernel 2.4.7-10

smb.conf available if necessary but since it's crashing with an error of
not being able to find the smb.conf before it even gets started I don't
think that's necessary.



On Wed, 2002-07-17 at 16:13, Wayne Walker wrote:
> On Wed, Jul 17, 2002 at 04:03:40PM -0500, Chris Tooley wrote:
> > Two things.
> > 
> > First:  You don't need to remove the installation you have to be able to
> > compile and use the SRPM.  Please don't remove it.  It's broken state is
> > valuable to the Samba team, which I don't claim to be part of. :)
> 
> Good point.
> 
> > Second:  Could you email me the output of "lsof".  It'll be fairly
> > long.  If at all possible, one way to make sure there are no locks on
> > the file is to <gasp> reboot, come up in runlevel 1, and run ./smbd.  
> 
> I think this is not necessary based on the strace output.  There are no
> calls to fcntl() or flock().
> 
> > I know this sounds completely horrible of me to say because it sounds
> > offensive but I don't mean it to be.  Are you certain that there aren't
> > any other versions of Samba installed and that they aren't running.
> > 
> > It is concievable, although again unlikely, that if an older version of
> > samba is installed and the libraries are in /usr/lib, which would be in
> > the library linker path, that you are using an incorrect library
> > version.
> > 
> > Wayne:  Can you tell from the strace that there are no files being
> > accessed outside of the /usr/local/samba directory?  If there are ANY
> > files being used outside that tree by the binary on startup then it's
> > likely that that is the problem.
> 
> Yes, I can tell.
> 
> No, there are no samba files outside of /usr/local.  Here are all the
> open calls from the strace (used sort -u to shorten # of lines)
> 
> open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 3
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
> open("/etc/localtime", O_RDONLY)        = 3
> open("/lib/i686/libc.so.6", O_RDONLY)   = 3
> open("/lib/libcrypt.so.1", O_RDONLY)    = 3
> open("/lib/libdl.so.2", O_RDONLY)       = 3
> open("/lib/libnsl.so.1", O_RDONLY)      = 3
> open("/usr/lib/libpopt.so.0", O_RDONLY) = 3
> open("/usr/local/samba/lib/smb.conf", O_RDONLY|O_LARGEFILE) = 4
> open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
> 
> > Chris Tooley
> > 
> > On Wed, 2002-07-17 at 15:56, Daniel Bakken wrote:
> > > > So TRY:
> > > >
> > > > mkdir /usr/local/samba/var
> > > >
> > > > or check permissions on /usr/local/samba/var/log.smbd
> > > 
> > > The file exists, and its permissions were 644 when I checked it. I changed
> > > it to 777 just for fun, but still the same error message.
> > > 
> > > I like what Chris was saying about RPMs and SRPMs. Maybe I'll try an RPM and
> > > see if I get the same error.
> > > 
> > > Daniel Bakken
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: linux-unsubscribe at ctlug.org
> > > For additional commands, e-mail: linux-help at ctlug.org
> > > ---------------------------------------------------------------------
> > > The Central Texas Linux User's Group meets at 7 PM on the third 
> > > Monday of every month at the facilities of Cisco Systems in Austin.
> > > See our website at <http://www.ctlug.org> for details.
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: linux-unsubscribe at ctlug.org
> > For additional commands, e-mail: linux-help at ctlug.org
> > ---------------------------------------------------------------------
> > The Central Texas Linux User's Group meets at 7 PM on the third 
> > Monday of every month at the facilities of Cisco Systems in Austin.
> > See our website at <http://www.ctlug.org> for details.
> 
> -- 
> 
> Wayne Walker
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: linux-unsubscribe at ctlug.org
> For additional commands, e-mail: linux-help at ctlug.org
> ---------------------------------------------------------------------
> The Central Texas Linux User's Group meets at 7 PM on the third 
> Monday of every month at the facilities of Cisco Systems in Austin.
> See our website at <http://www.ctlug.org> for details.
> 

-------------- next part --------------
execve("/usr/local/samba/bin/smbd", ["/usr/local/samba/bin/smbd"], [/* 22 vars */]) = 0
uname({sys="Linux", node="fuerte.encoretrading.com", ...}) = 0
brk(0)                                  = 0x81e4128
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=41568, ...}) = 0
old_mmap(NULL, 41568, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\36\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=65997, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40022000
old_mmap(NULL, 12756, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40023000
mprotect(0x40026000, 468, PROT_NONE)    = 0
old_mmap(0x40026000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x40026000
close(3)                                = 0
open("/lib/libnsl.so.1", O_RDONLY)      = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20?\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=436784, ...}) = 0
old_mmap(NULL, 89756, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40027000
mprotect(0x4003a000, 11932, PROT_NONE)  = 0
old_mmap(0x4003a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12000) = 0x4003a000
old_mmap(0x4003b000, 7836, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4003b000
close(3)                                = 0
open("/lib/libcrypt.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\17\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=85115, ...}) = 0
old_mmap(NULL, 183900, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4003d000
mprotect(0x40042000, 163420, PROT_NONE) = 0
old_mmap(0x40042000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x40042000
old_mmap(0x40043000, 159324, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40043000
close(3)                                = 0
open("/usr/lib/libpopt.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\21"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=29472, ...}) = 0
old_mmap(NULL, 27228, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4006a000
mprotect(0x40070000, 2652, PROT_NONE)   = 0
old_mmap(0x40070000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5000) = 0x40070000
close(3)                                = 0
open("/lib/i686/libc.so.6", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \306\1"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=5772268, ...}) = 0
old_mmap(NULL, 1290088, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40071000
mprotect(0x401a3000, 36712, PROT_NONE)  = 0
old_mmap(0x401a3000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x131000) = 0x401a3000
old_mmap(0x401a8000, 16232, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401a8000
close(3)                                = 0
munmap(0x40017000, 41568)               = 0
geteuid32()                             = 500
getegid32()                             = 500
time(NULL)                              = 1026859396
brk(0)                                  = 0x81e4128
brk(0x81e4150)                          = 0x81e4150
brk(0x81e5000)                          = 0x81e5000
open("/etc/localtime", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0"..., 4096) = 1279
close(3)                                = 0
munmap(0x40017000, 4096)                = 0
gettimeofday({1026859396, 706723}, NULL) = 0
open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 3
setresuid32(0, 0, 0)                    = -1 EPERM (Operation not permitted)
setuid32(0)                             = -1 EPERM (Operation not permitted)
geteuid32()                             = 500
setresgid32(0, 0, 0)                    = -1 EPERM (Operation not permitted)
setgid32(0)                             = -1 EPERM (Operation not permitted)
getegid32()                             = 500
rt_sigaction(SIGSEGV, {0x8135c20, [SEGV], SA_RESTART|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGBUS, {0x8135c20, [BUS], SA_RESTART|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x8068b60, [TERM], SA_RESTART|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0x8068b80, [HUP], SA_RESTART|0x4000000}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [PIPE], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [FPE], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [USR2], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [USR1], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0
umask(0)                                = 02
geteuid32()                             = 500
getegid32()                             = 500
getgroups32(0, 0xbffff608)              = 1
getgroups32(0x1, 0x81e41d8)             = 1
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
time(NULL)                              = 1026859396
umask(022)                              = 022
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(022)                              = 022
umask(022)                              = 022
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(022)                              = 022
umask(0)                                = 022
time(NULL)                              = 1026859396
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(0)                                = 022
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(0)                                = 022
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(0)                                = 022
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
time(NULL)                              = 1026859396
umask(022)                              = 022
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(022)                              = 022
umask(022)                              = 022
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(022)                              = 022
umask(0)                                = 022
stat64("/usr/local/samba/lib/smb.conf", {st_mode=S_IFREG|0755, st_size=684, ...}) = 0
open("/usr/local/samba/lib/smb.conf", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0755, st_size=684, ...}) = 0
read(4, "", 0)                          = 0
close(4)                                = 0
time(NULL)                              = 1026859396
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(0)                                = 022
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(0)                                = 022
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(0)                                = 022
brk(0x81e6000)                          = 0x81e6000
stat64("", 0xbfffed80)                  = -1 ENOENT (No such file or directory)
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
time(NULL)                              = 1026859396
umask(022)                              = 022
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(022)                              = 022
umask(022)                              = 022
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(022)                              = 022
umask(0)                                = 022
stat64("/usr/local/samba/lib/smb.conf", {st_mode=S_IFREG|0755, st_size=684, ...}) = 0
umask(022)                              = 0
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
time(NULL)                              = 1026859396
umask(022)                              = 022
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(022)                              = 022
umask(022)                              = 022
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
umask(022)                              = 022
umask(0)                                = 022
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
ioctl(4, 0x8912, 0xbfffc498)            = 0
ioctl(4, 0x8915, 0xbfffc4c0)            = 0
ioctl(4, 0x8913, 0xbfffc4c0)            = 0
ioctl(4, 0x891b, 0xbfffc4c0)            = 0
ioctl(4, 0x8915, 0xbfffc4a0)            = 0
ioctl(4, 0x8913, 0xbfffc4a0)            = 0
ioctl(4, 0x891b, 0xbfffc4a0)            = 0
close(4)                                = 0
brk(0x81e8000)                          = 0x81e8000
_exit(-1)                               = ?


More information about the samba mailing list