Change website owner - bug?

Discussion in 'Installation/Configuration' started by quartist, Oct 15, 2018.

  1. quartist

    quartist New Member

    Hi,
    I have a problem with changing website owner. I have a resseller (name AA) who create client (AAB). Client AAB on his account create 2 sites:
    - site one: site+db+ftpaccount
    - site two: site + ftpaccount

    How to migrate all resources from AAB to client (name C)? Client C was created by admin.

    When I (Admin) try to change owner for sites, then sites are visible on client C account but.... client AAB see his sites too.
    Question is: how to move all sites, db, ftp accounts from AAB to C. Finaly I want to delete AAB account.

    ISP version:
    ISPConfig 3.1.13 in multiserver config.
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    You must update database tables manually, I believe, there's not a way in the user interface yet.
     
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Try resync after you have reassign the websites. I think it will fix the access issue after it finished with the resync.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Alternative way is to create the websites,databases and FTP-accounts etc. for client C, and then move the files from AAB to C and dump and import the databases.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig currently changes only the 'owner' of the site, which is the group (sys_grouo), and not the creator (sys_user), which is the user. Therefore the 'old' creator has still access to the site. We should definitely change that in the future.
     
    ahrasis likes this.
  6. quartist

    quartist New Member

    Hi,

    thank you for all reply. Migration with moving file is time-consuming process. Resync after changing owner does not resolve problem. Have you an info, where in mysql change data? (sys_group), (sys_user), but it is not all.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    You just have to change the sys_user column of that record to the new user, that's all.
     
  8. quartist

    quartist New Member

    hmm. but what about path to directory on server and change owner to file? When I change sys_user, owner for file will be changed?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The only thing that does not get changed is the ID of the creator of the site within the ispconfig database. This ID is not used in any paths and it is not used for any file ownerships.
     
  10. quartist

    quartist New Member

    Hi,
    In client table, I dont have sys_user column:
    sys_userid | int(11) unsigned | NO | | 0 | |
    | sys_groupid | int(11) unsigned | NO | | 0 | |
    | sys_perm_user | varchar(5) | YES | | NULL | |
    | sys_perm_group | varchar(5) | YES | | NULL | |
    | sys_perm_other | varchar(5) | YES | | NULL

    Why sys_userid are not unique?
    MariaDB [dbispconfig]> select sys_userid, client_id ,sys_groupid, username from client;
    +------------+-----------+-------------+-------------+
    | sys_userid | client_id | sys_groupid | username |
    +------------+-----------+-------------+-------------+
    | 13 | 11 | 0 | A |
    | 5 | 5 | 5 | AAB |
    | 1 | 3 | 1 | B|
    | 1 | 4 | 1 | G |
    | 5 | 7 | 5 | F |
    | 5 | 8 | 5 | E |
    | 1 | 9 | 1 | D |
    | 1 | 10 | 1 | C |
    +------------+-----------+-------------+-------------+
    Which value I need to change?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    This is issue not about the client table, the client table does not has to be altered. You have to alter the record of the items that shall not be accessible like the website in the web_domain table and the column is sys_userid.
     
  12. quartist

    quartist New Member

    Hi,
    Which table I must altered for migration : db, ftp account, mail account ?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    You can't miss the tables, they are named after the 'things' that you migrated.
     

Share This Page