Submitted by RyanJohnson on Thu, 10/28/2010 - 20:36
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
Submitted by JamieCameron on Thu, 10/28/2010 - 20:46 Comment #1
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.Submitted by RyanJohnson on Thu, 10/28/2010 - 21:18 Comment #2
Hey Jamie
Yes it works via the web UI but not through remote api or command line
Submitted by JamieCameron on Thu, 10/28/2010 - 22:46 Comment #3
When you run the API command, what does it output?
Also, does it still fail even if you change the quota to something different?
Submitted by RyanJohnson on Thu, 10/28/2010 - 23:06 Comment #4
Updating virtual server marrsshop.com ..
Updating Webmin user .. .. done
Doesn't show the "updating disk quotas" text that appears in the web UI
Submitted by JamieCameron on Thu, 10/28/2010 - 23:22 Comment #5
Is the domain given with the
--domain
flag a top-level virtual server? Only they have quotas ..Submitted by RyanJohnson on Thu, 10/28/2010 - 23:24 Comment #6
Hey Jamie
Yes it is a top level server.
Submitted by JamieCameron on Thu, 10/28/2010 - 23:28 Comment #7
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 ..Submitted by RyanJohnson on Thu, 10/28/2010 - 23:38 Comment #8
That seemed to work but the remote api did not with this:
Submitted by JamieCameron on Thu, 10/28/2010 - 23:45 Comment #9
What was the output you got from the remote API?
Submitted by RyanJohnson on Thu, 10/28/2010 - 23:52 Comment #10
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:
No disk update,. so it appears that the user for my remote api hasn't got the right permissions or some such
Submitted by JamieCameron on Fri, 10/29/2010 - 12:25 Comment #11
That is really odd ... are you sure you are setting a different quota each time?
Submitted by RyanJohnson on Sat, 10/30/2010 - 02:40 Comment #12
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?
Submitted by JamieCameron on Sat, 10/30/2010 - 11:11 Comment #13
That should actually be enough.
Do the quotas still fail to get set even when you call the API remotely as root?