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.

Different home dir for resellers

Discussion in 'Workarounds and Optimization' started by moolideejay, Mar 17, 2017.

Tags:
  1. moolideejay

    moolideejay Member

    Joined:
    Nov 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    Hi

    By default cPanel detects /home as the default home-directory for users and put them all in there, unless you define "Additional home directory" in Basic-WebhostManager-Setup so cPanel creates new users in the partition with more free space.But this is not what we need.

    Our server has 3 SATA HDDs with RAID5 and a single /home directory , now we need to add a SSD Disk to the server for one of our customers which has a reseller account.

    Is it possible to define the default home directory for a reseller account so the newly created users under this reseller account be in the SSD disk?
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    175
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    so you are trying to create a seperate home directory for the reseller and his account on SSD ?
     
  3. moolideejay

    moolideejay Member

    Joined:
    Nov 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    Correct
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Negative, I could be wrong but the only way I've ever known to do this is via the 'Rearrange an Account' option in WHM, you would have to give the reseller access to it so they could move it to the SSD array. I am assuming not something you would want to do so that means, monitoring newly created accounts and using the ' Rearrange an Account' option in WHM and moving them over as you see them get created.

    I don't see any kind of hook/API call that you can do, not even a way to do it via SSH:

    How to "Rearrange an Account" in SSH?
     
  5. moolideejay

    moolideejay Member

    Joined:
    Nov 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    That's too painful!

    Any other ideas?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It's not possible to configure a default home directory for a reseller. I encourage you to vote and add feedback to the existing feature request for this at:

    Set home directory for reseller

    Thank you.
     
  7. moolideejay

    moolideejay Member

    Joined:
    Nov 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    I would definitely vote for this feature.
    In the mean time, is there an API call for "Rearrange an Account" functionality ?
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    There is no command-line or API equivalent to this option. However, you could develop a custom script that checks if the owner is a reseller, and if so , manually moves the account's home directory after the account creation process. You'd have to review unsupported workaround instructions when developing your custom script, and then look into the "Accounts::Create" hook to automatically run your custom script after each new account creation:

    Guide to Standardized Hooks - Software Development Kit - cPanel Documentation
    Guide to Standardized Hooks - Whostmgr Functions - Software Development Kit - cPanel Documentation

    Thank you.
     
  9. moolideejay

    moolideejay Member

    Joined:
    Nov 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    Thanks for the suggestion but as you've mentioned this is an unsupported workaround and in my experience doing so would increase the chance of breaking things, so I guess we have to wait for a native option in future releases of cPanel.
     
Loading...

Share This Page