The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Changing location of account

Discussion in 'General Discussion' started by dballanc, Aug 13, 2011.

  1. dballanc

    dballanc Registered

    Joined:
    Dec 29, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I'm running a cpanel machine in an OpenVZ instance that has a shared bind mounted folder with another OpenVZ instance to share some basically read-only media files. Unfortunately the bind point I chose was within the home folder of a system/non-web account user in the /home folder.

    Now I find that cpanel has considered this an 'available' partition despite being on the same physical drive and has been cluttering it with created web-accounts for several months.

    /home/mysystemuser/html is bind mounted to a host OS folder and should NOT be an acceptable location for web-accounts.

    My question is how do I:

    1) How do I move accounts created in that location back to /home

    /home/mysystemyser/html/webaccount1 move to /home/webaccount1

    2) How do I prevent this behavior in the future? I'm assuming moving the bind mounted html folder outside the home tree will do the trick?

    I'd appreciate any advice. Thanks!
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I'm going to answer question 2 first. I believe that you likely have the following set in WHM > Basic cPanel & WHM Setup area:

    If so, change the second one for the additional home directories to the field below home, and ensure it is blank. If you have it set to nothing (blank) in that field, it will then not allow anything other than /home to be used.

    Next, I do suggest changing the mount point to something else outside of /home.

    Finally, for your first question, please make a backup of those accounts that are in the wrong location first in case anything goes wrong. After that, try WHM > Rearrange an Account area to rearrange one of the accounts to /home instead to see if that works properly. If it does, then you could rearrange each account you have in the wrong location to the correct one using that section of WHM.
     
  3. dballanc

    dballanc Registered

    Joined:
    Dec 29, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Your solution worked perfectly, thank you. I do have one additional question. After moving an account a symbolic link is created to the new location. Deleting it did not appear to affect web-access to the moved site, but are there any issues with deleting it?
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I would check that /etc/passwd does not show the old path in it for the user. If it doesn't, then the only reason to keep it would be for any customer using the full path for the script they might have, since they might not have used a relative but an absolute path in a script. If you remove the symlink, then their script might not function any longer for that reason. Most customers do not use the full path but relative paths for coding purposes.
     
Loading...

Share This Page