Skip to main content

Account creation error (multiple home directories)

Comments

6 comments

  • 24x7server
    Hi, Yes, incidence like this has been reported. Did the actual symlink in /home2 already existed for the account that you moved to /home2, that is the most likely case. Check what is provided in the WHM basic setting for the home directory and then try creating a test account to see where does it get created? Can you share the output of this with us here.
    0
  • ronaldst
    In "Basic Webhost Manager Setup" I've set the location of new users to be created in /home1 Adding new account. Log bellow. Checking input data......Done Validating system setup......Done ...Done Validating IP......Done Validating Username......Done Validating Contact Email......Done Checking for database conflicts......Done WWWAcct 12.6.0 (c) 2018 cPanel, Inc.... Dns Zone check is enabled. +===================================+ | New Account Info | +===================================+ | Domain: someuser1029.com | Ip: 255.255.255.251 (n) | HasCgi: y | UserName: someuser1029 | PassWord: password | CpanelMod: paper_lantern | HomeRoot: /home2 | Quota: 2.44 GB | NameServer1: ns7.domain.com | NameServer2: ns8.domain.com | NameServer3: | NameServer4: | Contact Email: postmaster@domain.com | Package: Mini | Feature List: default | Language: en +===================================+ ...Done Running pre creation script (/usr/local/cpanel/scripts/prewwwacct)......Done Adding User...Removing Shell Access (n) Success...Done Setting up Horde database in the background.... Creating bandwidth datastore......Done Adding Entries to userdata......Done Updating the userdata cache......Done Setting up Mail & Local Domains...localdomains...valiases ...vdomainaliases...vfilters......Done Configuring DNS...Bind reconfiguring on mars using rndc Zone someuser1029.com has been successfully added ...Done Updating Authentication Databases......Done Adding Entries to httpd.conf......Done Updating user"s Apache jail filesystem......Done Restarting apache......Done Setting passwords......Done Updating the dedicated IP address usage cache......Done Verifying MX Records and Setting up Databases...Reconfiguring Mail Routing: LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for someuser1029.com's mail.: This configuration has been manually selected. ...Done Bind reloading on mars using rndc zone: [someuser1029.com] ...Done Sending Account Information......Done Running post creation scripts (/usr/local/cpanel/scripts/legacypostwwwacct, /usr/local/cpanel/scripts/postwwwacct, /usr/local/cpanel/scripts/postwwwacctuser)......Done wwwacct creation finished Setting up Domain Pointers......Done Setting Reseller Privs......Done Account Creation Complete!!!...Account Creation Ok...Done
    The account was created in /home2. [root@mars ~]# ls -la /home | grep someuser* [root@host ~]# ls -la /home1 | grep someuser* [root@host ~]# ls -la /home2 | grep someuser* drwx--x--x. 11 someuser1029 someuser1029 4096 Mar 12 11:19 someuser1029 [root@host ~]#
    Moving the account with Rearrange an Account. Now the results are [root@mars ~]# ls -la /home | grep someuser* [root@host ~]# ls -la /home1 | grep someuser* drwx--x--x. 11 someuser1029 someuser1029 4096 Mar 12 11:19 someuser1029 [root@host ~]# ls -la /home2 | grep someuser* lrwxrwxrwx. 1 root root 19 Mar 12 11:27 someuser1029 -> /home1/someuser1029 [root@host ~]#
    The files are moved to the choosen homedir, and a symlink created from the initial homedir /home2 to /home1. Is this symlink behaviour normal? The initial account creation obviously went to wrong home set. When moving the account it leaves behind a symlink in the original location /home2. EDIT! On further investigation I am seeing other users in /home symlinked to /home2 and back to /home1. I need to clean this up as I am seeing a fast path to disaster down the road. Its not normal behaviour for an account to be symlinked from /home -> home2 -> home1 right? How are the symlinks made, which arguments in 'ln' are used by WHM when rearranging accounts?
    0
  • cPanelMichael
    In "Basic Webhost Manager Setup" I've set the location of new users to be created in /home1

    Hello, You can force the use of "/home1" as part of the account creation, but only by disabling the "Additional home directories matching the following value will also be used for new home directory creations. (Leaving this value blank disables the feature.) This option only takes one value." option by entering a blank value. However, that will then require you to set this option to the "home" value again when it comes time to rearrange the account. Thus, there's currently no support to do exactly what you seeking without manually changing the settings each time you need to rearrange an account. We do have an existing feature request for this functionality at: On further investigation I am seeing other users in /home symlinked to /home2 and back to /home1. I need to clean this up as I am seeing a fast path to disaster down the road. Its not normal behaviour for an account to be symlinked from /home -> home2 -> home1 right? How are the symlinks made, which arguments in 'ln' are used by WHM when rearranging accounts?
    Symlinks are not setup as part of account creation. They are only setup from the existing home directory (e.g. /home1) to the new one (e.g. /home2) when using the Rearrange an Account option in WHM. You shouldn't see a symlink for an account in the /home directory if it was created in /home1 and rearranged to /home2. As far as the "ln" command, here's an example of how to create a symlink manually to another location if account existed in the /home directory: ln -s /home/username /home2/username
    Thank you.
    0
  • ronaldst
    Thanks for making this more clear Michael. I am left with one important question though. Does the symlink serve an important purpose once an account is rearranged to a new partition? Lets take the one user I got with multiple symlinks. user123 is symlinked from /home -> home2 -> home1. Can I delete the /home -> /home2 symlink, and recreate one from /home to /home1 without encountering any issues down the line? What about users that have rearranged from /home2 to /home1. Can the symlinks at /home2 be deleted without any issues? I am seeing a potential disaster in case /home2 harddrive crash or corrupts, making the /home1 -users rearranged from /home2 not function properly due to missing symlinks. Can anyone elaborate how I can best handle this? Obviously I want to remove any files/symlinks from /home2 and rely on /home and /home1 for cpanel accounts.
    0
  • cPanelMichael
    Hello, The symbolic links are not required, and you can remove them or adjust them to your own preferences. The primary reason they exist is to ensure a user's scripts continue to work if they hard-coded the paths to files/images (e.g. /home/user/public_html/123.jpg). Thank you.
    0
  • ronaldst
    Excellent. Every day I learn something new! Thanks.
    0

Please sign in to leave a comment.