Remote API modify-domain doesn't update disk quota

Hi

I have found a problem with the remote api and the command line interface.

if I issue this command, it doesn't update System -> Disk Quotas:

sudo virtualmin modify-domain --domain thedomain.com --quota 512000 --uquota 512000

Status: 
Active

Comments

If you edit a domain via the UI using the Edit Domain page, does that update quotas at System -> Disk Quotas on your system?

In my tests, the modify-domain command works fine.

Hey Jamie

Yes it works via the web UI but not through remote api or command line

When you run the API command, what does it output?

Also, does it still fail even if you change the quota to something different?

Updating virtual server marrsshop.com ..

Updating Webmin user .. .. done

Saving server details ..
.. done

Updating virtual server thedomainsub.com.au ..

Saving server details ..
.. done

Updating Webmin user ..
.. done

Re-loading Webmin ..
.. done

All done

Doesn't show the "updating disk quotas" text that appears in the web UI

Is the domain given with the --domain flag a top-level virtual server? Only they have quotas ..

Hey Jamie

Yes it is a top level server.

One more thing to check - if Virtualmin thinks that the quota for the domain is already set to whatever you specific with the --quota parameter, it will do nothing. So you should try with a slightly different quota ..

That seemed to work but the remote api did not with this:

https://...:10000/virtual-server/remote.cgi?uquota=512000&quota=512000&bw=8589934592&program=modify-domain&domain=thedomain.com&desc=marrsshop.com&email=person%40thedomain.com&template=Silver+Web+Hosting&plan=Silver+Web+Hosting

What was the output you got from the remote API?

ok we're getting closer

With my user name it worked, but I have a special account set-up for the api and I got:

Updating virtual server thedomain.com ..

Modifying administration user ..
.. done

Updating Webmin user ..
.. done

Saving server details ..
.. done

Updating virtual server thedomainssub.com.au ..

Saving server details ..
.. done

Updating Webmin user ..
.. done

Re-loading Webmin ..
.. done

All done

Exit status: 0

No disk update,. so it appears that the user for my remote api hasn't got the right permissions or some such

That is really odd ... are you sure you are setting a different quota each time?

No I'm net getting a different quota each time. I think it's related to permissions of the account that I'm using. I have assigned only Virtualmin Virtual server permissions. That seems to not be enough?

That should actually be enough.

Do the quotas still fail to get set even when you call the API remotely as root?