Which partition is used for new accounts?

zhongshan

Member
PartnerNOC
Jan 17, 2008
24
10
53
Hey guys

I'm using some custom made migration scripts and since my server has /home and /home2 I need to know beforehand which of these partitions will be used for the new account.

I was trying to read the Perl source code (/usr/local/cpanel/Whostmgr) to understand the behavior but I'm afraid that the Accounts::Create module is unshipped, so I couldn't figure it out.

So before just guessing this is simple matter of available space I would like to ask you guys.

Thank you in advance

zs
 

quietFinn

Well-Known Member
Feb 4, 2006
1,787
406
438
Finland
cPanel Access Level
Root Administrator
Go to WHM -> Server Configuration -> Basic Webhost Maneger Setup -> Basic Config

In your case if you have the default settings and /home2 has more space than /home then accounts will be created there.
 
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,265
1,297
363
Houston
@quietFinn is correct this is the best way to do this. Let us know if you're still experiencing issues once this is configured or if this doesn't resolve your issue.
 

jlucho

Well-Known Member
Aug 5, 2006
100
1
168
hi

I thought there was a parameter to /script/wwwacct , to create a host on a specific partition, and that all other hosting accounts continue to create on the default partition
 

HostNoc

Well-Known Member
Feb 20, 2020
155
38
28
Ontario
cPanel Access Level
Root Administrator
Yes, and by default, cPanel/WHM will recognize /home2 and /home3 and so forth and automatically allocate new accounts to the partition with the most free disk space.

This functionality can be customized in WHM -> Server Configuration -> Basic cPanel/WHM Setup under "Default Home Directory" and "Home Directory Prefix."
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,382
2,106
363
cPanel Access Level
Root Administrator
@jlucho - I'm not seeing a flag when I check just now:

Code:
# /scripts/wwwacct --help
Please use the following syntax:
wwwacct <domain> <user> <pass> <quota> <cpmod[advanced/?]> <ip[y/n]> <cgi[y/n]> <frontpage[always n]> <maxftp> <maxsql> <maxpop> <maxlst> <maxsub> <bwlimit> <hasshell[y]/[n]> <owner> <plan> <maxpark> <maxaddon> <featurelist> <contactemail> <use_registered_nameservers> <language> <spamassassin[Y/n]> <max_emailacct_quota> <spambox[Y/n]>