Hi,
Okay... i ran "strace vadddomain test39.com"
a bunch of output. I gather that strace basically traces what the program
is doing (just looking from the output).
So anyway, it stopped at asking for the postmaster password. I assume you
don't actually want that bit, so I just typed in the password, and it
asked me to type in again, i did, and then another bunch of output came
out. I ran this command on 2 different boxes. One box (the one with the
problem) and one WITHOUT the problem, to compare the output and see what
the difference was.
I'll mainly only show the differences... maybe you have the knowledge to
work out what is wrong. Both boxes have nearly identical structures. On
the working box, /var points to /mnt/large/var , while on the broken box,
/var points to /mnt/mid/var , in case you wonder why the two are different
(large, mid, small, etc. are just hard disk mount points) (btw. ***** is
just me highlighting something):
WORKING BOX:
-------------
ioctl(3, 0x5401, {B38400 opost -isig icanon -echo ...}) = 0
write(3, "enter password again: ", 22enter password again: ) = 22
read(3, "test\n", 4096) = 5
write(3, "\n", 1
) = 1
ioctl(3, 0x5404, {B38400 opost isig icanon echo ...}) = 0
close(3) = 0
munmap(0x40017000, 4096) = 0
umask(077) = 022
*****getcwd("/mnt/large/var/lib/vpopmail/domains", 300) = 36*****
chdir("/var/lib/vpopmail") = 0
chdir("domains") = 0
stat("test39.com", 0xbffffc2c) = -1 ENOENT (No such file or
directory)
mkdir("test39.com", 0750) = 0
chown32(0x804b660, 0xfa14, 0xfa14) = -1 ENOSYS (Function not
implemented)
chown("test39.com", 64020, 64020) = 0
chdir("test39.com") = 0
open("/var/lib/vpopmail/domains/test39.com/.qmail-default",
O_RDWR|O_CREAT|O_TRUNC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
write(3, "| /var/lib/vpopmail/bin/vdeliver"..., 58) = 58
close(3) = 0
-------------
BROKEN BOX:
-------------
ioctl(3, 0x5401, {B38400 opost -isig icanon -echo ...}) = 0
write(3, "enter password again: ", 22enter password again: ) = 22
read(3, "test\n", 4096) = 5
write(3, "\n", 1
) = 1
ioctl(3, 0x5404, {B38400 opost isig icanon echo ...}) = 0
close(3) = 0
munmap(0x40017000, 4096) = 0
umask(077) = 022
*****getcwd("/root", 300) = 6*****
chdir("/var/lib/vpopmail") = 0
chdir("domains") = 0
stat("test39.com", 0xbffffc3c) = -1 ENOENT (No such file or
directory)
mkdir("test39.com", 0750) = 0
chown32(0x804b660, 0xfa14, 0xfa14) = -1 ENOSYS (Function not
implemented)
chown("test39.com", 64020, 64020) = 0
chdir("test39.com")
open("/var/lib/vpopmail/domains/test39.com/.qmail-default",
O_RDWR|O_CREAT|O_TRUNC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
write(3, "| /var/lib/vpopmail/bin/vdeliver"..., 58) = 58
close(3) = 0
-------------
I can see on the WORKING box it is doing:
getcwd("/mnt/large/var/lib/vpopmail/domains", 300) = 36
on the BROKEN box it is doing:
getcwd("/root", 300) = 6
which obviously is WRONG. It should say something
"/mnt/mid/var/lib/vpopmail/domains", but it isn't.
Okay... further down I found another big difference... again, pointing to
incorrect directories:
WORKING BOX:
----------------
SIGCHLD (Child exited) ---
close(3) = 0
wait4(19589, [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) = 19589
munmap(0x40017000, 4096) = 0
kill(388, SIGHUP) = 0
chdir("/mnt/large/var/lib/vpopmail/domains") = 0
umask(077) = 077
open("/var/qmail/users/cdb", O_RDONLY) = 3
lseek(3, 2000, SEEK_SET) = 2000
read(3, "\347\17\0\0\2\0\0\0", 8) = 8
lseek(3, 4071, SEEK_SET) = 4071
read(3, "\3724\256u,\16\0\0", 8) = 8
lseek(3, 3628, SEEK_SET) = 3628
read(3, "\f\0\0\0>\0\0\0", 8) = 8
read(3, "!test39.com-", 12) = 12
fstat(3, {st_mode=S_IFREG|0644, st_size=4103, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
read(3, "test39.com\00064020\00064020\0/var/lib/"..., 4096) = 455
getpid() = 19399
open("/var/lib/vpopmail/domains/test39.com/vpasswd.cdb", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/var/lib/vpopmail/domains/test39.com/.vpasswd.lock",
O_RDWR|O_CREAT|O_TRUNC, 0666) = 4
----------------
On the BROKEN box:
----------------
--- SIGCHLD (Child exited) ---
close(3) = 0
wait4(21753, [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) = 21753
munmap(0x40017000, 4096) = 0
kill(372, SIGHUP) = 0
chdir("/root") = 0
umask(077) = 077
open("/var/qmail/users/cdb", O_RDONLY) = 3
lseek(3, 2000, SEEK_SET) = 2000
read(3, "9\23\0\0\0\0\0\0", 8) = 8
close(3) = 0
getpid() = 21678
open("/vpasswd.cdb", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/.vpasswd.lock", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3
fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
open("/vpasswd", O_RDONLY) = -1 ENOENT (No such file or
directory)
fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
close(3) = 0
open("/vpasswd.cdb", O_RDONLY) = -1 ENOENT (No such file or
directory)
getcwd("/root", 300) = 6
chdir("") = -1 ENOENT (No such file or
directory)
chdir("/root") = 0
write(1, "E", 1E) = 1
write(1, "rror: Unable to chdir to vpopmai"..., 52rror: Unable to chdir to
vpopmail/domains directory
) = 52
_exit(-5)
----------------
Okay, so thats the end of the BROKEN box output. Here is where that
"Unable to chdir to vpopmail" stuff is.
On the Working box, it does:
chdir("/mnt/large/var/lib/vpopmail/domains") = 0
But on the Broken box, it does:
chdir("/root") = 0
The Working box then goes on to do lotsa stuff like create the Maildir for
postmaster and stuff like that.
Now the question is... where the HECK is vpopmail getting the idea that
/root is where vpopmail is?
On both the working and broken boxes, the passwd entry is:
vpopmail:x:64020:64020:Vpopmail user,,,:/var/lib/vpopmail:/bin/bash
which is correct.
This is killing me. I now have an idea on what is wrong, but NO idea on
how to fix it :-((
Getting closer... but still no joy :-/
Any idea?
Sincerely,
Jason
----- Original Message -----
From: "Chris Bolt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2001 4:52 PM
Subject: RE: moving domains ???????
> What are the last few lines when you type:
>
> strace vadddomain testx.com
>
> > Hi all,
> >
> > I have this strange problem that has suddenly occurred recently.
> >
> > I keep getting the following error when running vadddomain:
> >
> > sh-2.05# vadddomain test14.com
> > Unknown parameter:
> >
> > Please enter password for postmaster:
> > enter password again:
> > Error: Unable to chdir to vpopmail/domains directory
> > sh-2.05#
> >
> > On all other boxes, that command runs fine. And I've already checked
the
> > permissions on ALL the directories leading up to the one in ~vpopmail.
I
> > also checked the permissions of ~vpopmail/domains, and it is the same
as
> > everything else.
> >
> > The strange thing is that it DOES create the directory:
> > drwx------ 2 vpopmail vchkpw 4096 May 25 00:45 test14.com
> >
> > however, inside that directory only the following exists:
> > total 12
> > drwx------ 2 vpopmail vchkpw 4096 May 25 00:45 .
> > drwx------ 23 vpopmail vchkpw 4096 May 25 00:45 ..
> > -rw------- 1 vpopmail vchkpw 58 May 25 00:45 .qmail-default
> >
> > and nothing else. No vpasswd or vpasswd.cdb or anything else. Anyone
know
> > whats going on?
> >
> > I also found:
> >
> > sh-2.05# ls -al /
> > total 1467
> > drwxr-x--x 17 root root 4096 May 25 00:22 .
> > drwxr-x--x 17 root root 4096 May 25 00:22 ..
> > -rw------- 1 root root 0 May 25 07:57 .vpasswd.lock
> >
> > suddenly after running vadddomain .
> >
> > vadduser doesn't work at ALL.
> >
> > Does anyone have any ideas? Free beer to the guy that figures this one
out
> > :-)
> >
> > Thanks in advance.
> >
> > Jason.
>
>