HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Possible bug in admin / reseller / client domain allocation (http://www.howtoforge.com/forums/showthread.php?t=43565)

finn 20th February 2010 01:57

Possible bug in admin / reseller / client domain allocation
 
Hi there.

We have hit on a possible bug, or combination of bugs. I know there is a bug tracker, but wanted to post here first in case we are missing something or others came across this.

We have resellers and clients setup in ISPConfig 3.0.1.6 on Debian Lenny.

Symptoms:
Log in as admin, set up a reseller, set up a domain and assign the domain to a reseller. Then log in as reseller, click on sites, websites, domain, and click on the stats tab. This gives us an error:

Error

1. error_no_view_permission

The website domain is then no longer available to the reseller logged in.

Logging back in as admin reveals that the domain is now apparently owned by a different client. This is rather worrying.

Possible cause?:
So, reviewing the ispconfig database ( dbispconfig in our case) shows that that all web domains created by the admin user have the sys_userid of 1 (the admin user). Is this right?

We think that when the domain is assigned to the client, the domain should perhaps inherit the sys_userid of the new client. So when we set the sys_userid to that of the new client, the domain pops back into the client's control panel, and the client can then view the stats tab.

Further investigation shows that this behaviour is only exhibited when the web domain is assigned to a reseller, not to a non-reseller client. When the domain assigned to the reseller is accessed, and the stats tab is clicked, we get the error mentioned and the value for the sys_groupid in the web_domain table is changed.

Is this behaviour repeatable by anyone else?
Has something happened to our data to result in inconsistency?

Is somewhere we can see a description of the database schema and how the various sys_userid, sys_groupid, client_id should be interacting?

Many thanks.

Finn.

till 20th February 2010 12:04

Please see the bugtracker, there have been several issues related to resellers already been closed and will be released with 3.0.2. Beside that, the above error can only happen if you added system users manually. Instead of adding a system user, you always have to add a client or reseller. System users can not be added manually. If you add them manually, you get the above error message as no client or reseller record is assigned to the system user then.

finn 21st February 2010 22:28

Hi Till.

Thanks for your reply. I did not know that adding system users outside of the control panel would cause issues. I will check to see if this is what happened but suspect that we have added a at least 1 user manually.

If we have added a system user outside of the control panel, is there a way to make sure that inconsistent user and group records are fixed?

Thanks again.

Finn.

till 21st February 2010 22:35

It should be enough to delete this user. If the user has added some items, you should be able to assign them to another client when you are logged in as admin.


All times are GMT +2. The time now is 01:56.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.