Bug? Alias Domains können nicht gelöscht werden / Alias Domains couldn't deleted

  • english text below


    Folgendes Problem auf Testserver und Produktivsystem mit i-MSCP 1.1.17:


    User beauftragt im Admin Panel eine Alias Domain.


    Reseller genehmigt diese im Admin Panel


    Alle zugehörigen Ordner werden angelegt von i-MSCP.


    User löscht die Alias Domain und bekommt einen Error: Status: Unerwarteter Fehler


    Fehlermeldung in der Datenbanktabelle domain_aliasses -> alias_status: iMSCP::Dir::remove: Unable to delete directory /var/www/virtual/hostonline.netz/domainalias.netz: cannot remove directory: Permission denied


    SSH-Login als User root, und löschen des betreffenden Unterverzeichnisses schlägt fehl: User root hat keine Rechte, um das Unterverzeichnis /var/www/virtual/hostonline.netz/domainalias.netz zu löschen.


    Händisches Setzten des Eigentümers / der Rechte des Ordners domainalias.netz mittels chown von vu2003 : vu2003 auf root : root, ist kein Problem


    Löschen des betreffenden Unterverzeichnisses schlägt fehl: User root hat keine Rechte, um das Unterverzeichnis /var/www/virtual/hostonline.netz/domainalias.netz zu löschen.


    Problem: Wenn User root den Ordner nicht löschen kann, kann es i-mscp auch nicht.


    Dasselbe Problem übrigens auch nach Sperrung eines Users mit dem Ordner /var/www/virtual/hostonline.netz/domain_disable_page


    Frage: Problem von i-MSCP, oder eine Problem von DEBIAN?


    Habe keine Idee dazu.


    english:


    following problem on test server and productive system with - i-MSCP 1.1.17:


    user creates in admin panel an - Alias Domain.


    Reseller gives permit in - Admin Panel


    All folders are created from - i-MSCP.


    user deletes alias domain and get an error: status unexpected error


    error message in data base table - domain_aliasses -> alias_status: iMSCP::Dir::remove: Unable to delete directory /var/www/virtual/hostonline.netz/domainalias.netz: cannot remove directory: Permission denied


    ssh-login as user root, try to delete the sub directory impossible because user root has no permissions to delete /var/www/virtual/hostonline.netz/domainalias.netz


    no problem to make a chown from vu2003 : vu2003 to root : root


    Try to delete the sub directory impossible because user root has no permissions to delete /var/www/virtual/hostonline.netz/domainalias.netz


    Problem: if user root can't delete this folder, imscp can"t delete too.


    the same problem after temporary disable of an user with folder - /var/www/virtual/hostonline.netz/domain_disable_page


    Question: problem of i-MSCP or problem of DEBIAN?


    have no idea for a solution.


    In this case no edits of user in imscp possible because missing the "ok" in data base table - domain_aliasses -> alias_status:


    Edit: try to create a folder in /var/www/virtual/hostonline.netz/ not possible with same error message. Problem in permissions for this folder?


    Solution? in reseller - > Customers - > edit domain -> is a button Web folder protection - if this is switched on "Yes" i-MSCP and user root ist not possible to delete anything in user folder.

  • Hello ;


    Please next time, separate the English text from the German text because here, this is a hell for reading...


    I'll try to reproduce the problem related to the deletion of domain aliases by the customers but here is what you must know:


    The folders are protected by the immutable bit. Normally, that flag is removed before any directory deletion attempt. To remove that flag as root, you must use the chattr command.


    What fs are you using exactly?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Re;


    Ok, I can reproduce the bug. I'll fix it now. The immutable flag is not removed correctly...


    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Nuxwin, you are too fast fore me ;-) so it's impossible to edit my post ;-)


    It is the web folder protection...


    I use ext4 on both servers.


    I see following: If an user deletes his Alias domain and his webfolders are protected, no one (reseller or admin)can make changes in admin panels; in this case you must make changes in database for correct this..., and after this changes reseller must change the webfolder protect... and then user can delete alias domain again...


    Possible to change this for imscp-user?

  • See my previous answer... It's a bug. I'll fix it now. Once done, I'll explain what the reason.


    EDIT


    Ok, as I see, the flag is not removed on the parent domain directory before the domain alias directory deletion, which explain the error there.... More explanation will come in my next commit.


    EDIT


    Normally, that bug should also affect the subdomains ;)


    I'll have to release the version 1.1.18 today...


    EDIT


    Should be fixed. See https://github.com/i-MSCP/imsc…c527b8942fab827bf305fbca4


    @Chrissio


    Please, can you update your version to the 1.1.x branch ( https://github.com/i-MSCP/imscp/archive/1.1.x.zip ) and confirm that my last commit fix the problem?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Give me a little bit time for update the test server - because first i must deactivate plugins... in another Thread (an User had problems after update because he hasn'T deactivated plugins) i read something about a database command for deactivate plugins...


    is possible to put this into the installer?


    (like "if activated plugins, deactivate... then install update... then activate plugins again")?

  • @Chrissio


    Too late ;) The release script is now running meaning that the new version is on the road.


    About plugins


    They should be deactivated only if really needed (eg, when updating to new major i-MSCP version). Normally, the plugins manage the update case. So no, I'll not deactivate them automatically in the installer.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hey, i was eating by my daughter. Ready with updates on my test server.


    Problem is solved.


    Nuxwin, a question: Do you know this?


    I write something about a bug - and 10 seconds before i post the bug, you post the solution!


    Thats fast, very fast...

  • @Chrissio


    I've solved the bug once you reported it. It was not fixed before as you say ;) Well, I've the needed tools to be fast, nothing more. Also, I known each piece of code from i-MSCP and so, when a bug is discovered, I can fix it easily. Such a bug was really easy to fix ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Nuxwin Thats ok - but i must tell you:


    You are the fastest developer I've ever seen... From your speed, many other developer could learn how to do...