cyberpanel icon indicating copy to clipboard operation
cyberpanel copied to clipboard

[BUG] Deleting a subdomain may delete the whole public_html folder

Open hadi060 opened this issue 2 years ago • 0 comments

I've noticed two issues with subdomains in CyberPanel: 1- If you create a subdomain and its path is public_html, CyberPanel will not create a directory for it inside the public_html folder. Instead, it will only create an index.html file in the main public_html folder. This is a problem because if you delete this subdomain and choose to delete its root folder, the entire public_html folder will be deleted. 2- If you have an old subdomain directory that is inside the public_html folder (this was possible before), and you delete this subdomain and its folder, CyberPanel will delete the entire public_html folder. This means that all of your files will be lost.

To Reproduce

  1. Create a subdomain and put "public_html" as its path;
  2. Delete that subdomain.
  3. The "public_html" folder is deleted.

Expected behavior

  1. CyberPanel should create the subdomain inside public_html folder.
  2. CyberPanel shouldn't delete the public_html folder when deleting that subdomain with its root folder.

Operating system: Ubuntu 20.04 LTS

CyberPanel version: 2.3.4

hadi060 avatar Aug 29 '23 15:08 hadi060