Move Domain troubles on freebsd

DA-Rff

Verified User
Joined
Dec 4, 2006
Messages
119
I ran the suggested method of DA to move domains:

cd /usr/local/directadmin/scripts
./move_domain.sh domain.com olduser newuser

This is what happened on the server:

[: !=: unexpected operator
Moving domain data to the new user.
Setting ownership for domain.com domain.
Removing domain from old user.
Adding domain to new user.
Changing domain owner.
implement ip swap
In debug mode
Debug set to level 10
root priv set: uid:0 gid:0 euid:0 egid:0
pidfile written
staring queue
done queue
Updating email settings.
Can't open /etc/virtual/domain.com/majordomo/list.aliases: No such file or directory.
Can't open /etc/virtual/domain.com/majordomo/lists/*: No such file or directory.
Updating ftp settings.
Domain has been moved to new user.

After that the domain throws a 403 warning.

I tried this a while ago and had the same problem, I then had to reinstall the cms to get it working, but this site is just some html page, all static, no databases, no config files and still it does not work.

I need to move a number of sites away from the admin each to their own accounts.

I know I should not have set them up under the admin account, but I am just a self hoster who started couple of years ago and all worked fine until I had too many sites and now need to change some to other servers, so if anybody can help to get this script to work properly on freebsd, please help.

I have no problem with the databases left intact, I can understand that logic.

Or maybe there is another smart way to move domains to other user?

thanks!
 
Whoever wrote the script didnt put quotes around the variables or didnt space it out correctly.
 
Hello,

Thanks for the report. The issue is that FreeBSD doesn't load the UID variable in the shell.
I'll just use the "id" command to set this so it's loaded for all cases.
I've also added the "quotes" around the variable, and made this change to the move_user_to_reseller.sh and user_to_reseller.sh scripts as well.

As a workaround untill the next release, add:

UID=0

just after the VERSION= setting.

John
 
UID=0

seemed to work on a static site, not with php cms.

Any more ideas?
 
I have exactly the same problem. If I add UID=0 it says:

./move_domain.sh: line 9: UID: readonly variable

Any other solution available?


edit:
This problem is probably related, when I do a change_username.sh user1 user2, I get a lest of errors like:

Can't open /etc/virtual/thedomein.com/majordomo/list.aliases: No such file or directory.
Can't open /etc/virtual/thedomein.com/majordomo/private.aliases: No such file or directory.

For pretty much every domain belonging to user1.
 
Last edited:
Back
Top