Account Plans not working properly

Allow sub-servers under other users' domains? & Allow sub-servers not under this domain? are not working.

I have both these set to No and even them I am able to create subserver not under top level server and also able to create subserver of domain belonging to other users.

Kindly look into this ASAP. This is happening on both Pro and GPL on Ubuntu 14.04 & CentOS7

Status: 
Active

Comments

Are you creating these domains as root, or when logging in as the domain owner?

I am created the top level server as root and sub server as domain owner.

Can you post the contents of the file /etc/webmin/virtual-server/USER.acl where USER is the domain owner's login?

Here are contents:

cat webdemos.acl feature_virt=0 feature_postgres=1 edit_admins=1 ipfollow= feature_virtualmin-awstats=1 feature_webalizer=1 nodbname=0 feature_unix=1 edit_ssl=1 edit_phpver=1 edit_phpmode=1 stop=0 forceunder= edit_domain=1 edit_mail=1 edit_html=1 edit_dnsip=0 feature_dns=1 feature_virtualmin-git=1 edit_dbs=1 edit_allowedhosts=1 feature_virtualmin-sqlite=1 local=0 feature_mail=1 feature_ftp=0 create=2 import=0 edit_scripts=1 edit_catchall=1 feature_dir=1 edit_sharedips=0 admin= feature_logrotate=1 feature_virtualmin-signup=1 edit_spf=1 domains=14735014678152 feature_webmin=1 edit_sched=1 feature_virtualmin-init=1 feature_mysql=1 edit_forward=1 edit_redirect=1 edit_disable=1 feature_ssl=1 feature_virus=1 noconfig=1 edit_records=1 feature_spam=1 edit_backup=1 edit=2 edit_restore=1 edit_aliases=1 feature_status=1 feature_virtualmin-dav=1 edit_spam=1 edit_delete=1 edit_users=1 edit_passwd=1 safeunder= allowedscripts= feature_virtualmin-google-analytics=1 norename=1 feature_web=1 edit_ip=0

From that file, it looks like the restriction to force new domains to be under the parent isn't enabled - the forceunder line should be forceunder=1

What page in Virtualmin did you originally set this on?

What I did is: Created Account Plan as :

Plan name Unlimited Silver Package Quota for entire server Unlimited   Quota for server administrator user Unlimited   Limit on number of mailboxes Unlimited Limit on number of aliases Unlimited Limit on number of databases Unlimited Limit on number of virtual servers Unlimited Limit on number of alias servers Unlimited Limit on number of non-alias servers Unlimited Bandwidth limit Unlimited Limit on number of Rails server instances Unlimited Can choose database names? Yes Can rename domains? No Allow sub-servers not under this domain? No Allow sub-servers under other users' domains? No

And then added the domain Selecting the above account plan

If you go to Administration Options -> Edit Owner Limits for the domain, is "Allow sub-servers not under this domain?" set to "Yes" or "No" ?

"Allow sub-servers not under this domain?" was set to Yes. If I change to No. It saves and stores it properly. I think it is not getting the value from Account Plan properly.

I just tried creating another top level server with a new account plan with same settings but even that had

Allow sub-servers not under this domain? Yes

Allow sub-servers under other users' domains? Yes

while both these were set to No in Account Plan

I'm confused as to why that isn't happening ..

In your /etc/webmin/virtual-server/config file, do you have the line template_auto=1 ?

template_auto=0 is in config file. Should I change it to 1 ?

Yes, try setting it to 1 (which is the default in new Virtualmin installs).

When this is set to 0, you have the option of setting various limits on the domain creation form to override the defaults from the plan. However, due to a bug this means that the "force domains to be under parent" option isn't copied from the plan to the new user.

Yes it works fine when using template_auto=1 in config file.

So the bug only happens when we have changed setting to allow overrides at creation time. (BTW this used to work fine few months back)

Looking at the code, I don't think this ever worked properly actually..