[CPANEL-22562] User home directory created as symlink to whostmgr docroot

Cristian Aray

Registered
Feb 24, 2018
2
1
3
Costa Rica
cPanel Access Level
Root Administrator
I've been struggling with transfering accounts from one WHM account to the other, because mail folders are huge. In that process I've created and terminated some accounts multiple times.

The last thing I was trying was to create a backup from cPanel, excluding mail/new mail/cur folders. All good until that, but when I went to import the backup into WHM, I got an error about the unmanaged database user, fixed that and try again, second try throws an error because the home/username folder already exists.

So, I rm -rf /home/username/ ... didn't work because I'm stupid.

Again rm -rf /home/username does work... so I go to WHM to retry the import, and surprise surprise...

file error - menu/main.tmpl: not found

I tried forcing a cPanel Update a couple of time, finishing both successfully but the error is not gone. Can't access WHM but the Accounts seems to be working no issues.

Any idea what could be wrong and how I can fix this?

Is WHM username account looking for a theme file that I delete?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello,

The error message you noticed can appear if required files were removed. Try running the following command to see if it solves the issue:

Code:
/scripts/updatenow.static -sync
Thank you.
 

Areeb111

Registered
Dec 27, 2007
1
0
51
I did the same thing, But i was forced to do,
Because i was transferring a website from another server and suddenly it stoppes because the hard disk is full,
Changed the home directory path and retried, And it says you need to remove the files manually.
I removed them by #rm -rf /home/username
But i got file error - menu/main.tmpl: not found
I don't know why there are important files stored in the user's directories ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello @Areeb111,

It's possible the error message in the WHM UI didn't stem from removing the account's home directory, but rather from a failure to generate required files when the server was out of available disk space. Thus, the subsequent update (with the additional free space) was able to download the required files and correct the issue.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello,

To update, internal case CPANEL-22562 is open to report an issue where where aborted or failed transfers can leave a symbolic link at the /home/$USER location pointing to /usr/local/cpanel/whostmgr/docroot/. I'll monitor case CPANEL-22562 and update this thread with the outcome once it's complete. In the meantime, note that attempting to manually remove /home/$USER with the "rm -rf" command (and a trailing slash at the end of the path) can then lead to the removal of required files since that command follows the symbolic link and removes the directory it points to. To workaround the issue in the meantime, a command like the following should be used instead of the "rm -rf /home/username/" command:

Code:
rm -vi /home/username
This will prompt a confirmation to remove only the symbolic link itself.

Thank you.