web assigned to wrong user

Discussion in 'General' started by melwood, Jun 17, 2007.

  1. melwood

    melwood New Member

    Hi,

    ISPConfig show some very strange behavior here:
    I have several user with several webs. The webs are all correctly assigned to the user when I'm logged-in as admin. But when I login as a user, some webs are assigend to the wron users.

    An example: Lets say I have three user u1, u2 u3 and three webs w1, w2, 3

    The webs are assigned like this:

    u1 => w1
    u2 => w2
    u3 => w3

    This is what I see when I'm logged in as admin.

    logged in as u1: u1 has w1 and w2
    logged in as u2: u2 has no web
    logged in as u3: u3 has w3

    This is only an example. Is it possible, that my database has a problem? Any idea where to look for the problem?

    melwood

    PS: Almost forgott: When I move w2 back to u2, first everything is fine, but after a while w2 is back at u1. I'm not sure, but I think it happens the first time u2 loggs into his accoutn and changes something...
     
    Last edited: Jun 17, 2007
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Hvae you modified or deleted something in the mysql database manually?
     
  3. melwood

    melwood New Member

    No, but I had a browser-freeze when I added a web. After that I had to re-add the web. Maybee something mixed-up there.

    I investigated a little more and it seems the problem is in the db-table "isp_dep".

    I don't understand the database-scheme fully, but as I see, an entry like

    'parent_doc_id = 1, parent_doctype_id = 1012, child_doc_id = 5, child_doctype_id = 1013'

    assigns a web (child_doctype_id = 1013) to a user (parent_doctype_id = 1012).

    All the webs that are wrong assigned are incorrectly assing in "isp_dep" to the "user_id" 1.

    So I correct this. Now when a user loggs in, he sees the right webs assigned to him and the assignment isn't changed back when he edits something.

    But now, when I'm logged in as an admin, the webs are assigned two times within the user.

    This is probably, because there are two entries now in "isp_dep". But I don't know which of the two entires is obsolete...

    I have attached a sql-dump of "isp_dep", maybe someone can help figure out what to delete?

    Or is there a database scheme or a document that explains how the database for ISPConfig works?

    Sorry for the mess,
    melwood
     

    Attached Files:

    • sql.txt
      File size:
      2.3 KB
      Views:
      149
    Last edited: Jun 18, 2007
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Your understanding of the database scheme is correct. The isp_dep table maps the isp_isp_web records to the isp_isp_kunde (client) records. If there are any duplicate records in the table where the 4 columns parent_doc_id, parent_doctype_id, child_doc_id and child_doctype_id are identical, you should delete the duplicates. Make a backup of the table before you do any changes.
     

Share This Page