Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Any problem to delete /cgi-bin/ and /.well-known/ directories?

Discussion in 'General Discussion' started by Ishware, Sep 21, 2017.

  1. Ishware

    Ishware Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    194
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Panama City, FL
    cPanel Access Level:
    Root Administrator
    The actual question is: If I'm not using cgi-bin, can I safely delete it? And what are the ramifications if I delete /home/[user]/public_html/.well-known?

    I ask because I'm working on a script that, among other things, "refreshes" a public_html, i.e. removes all the files and directories, and my knowledge of regex makes it hard for me to figure out how to adapt a recipe for this. So it'd be easier for me to delete these directories if it doesn't matter. :)

    For the record, in case anyone is good enough at regex and would like to help, the recipe I found to remove all files including hidden is as follows:

    rm -rf {,.[!.],..?}*

    Source: coderwall.com/p/kksf5q/delete-all-files-including-hidden-ones-with-just-one-rm
    Delete all files (including hidden ones) with just one rm (Example)
     
    #1 Ishware, Sep 21, 2017
    Last edited by a moderator: Sep 21, 2017
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,532
    Likes Received:
    1,966
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Yes, you can remove this directory if you are not using it.

    That directory is used for AutoSSL validation purposes. You can read more about it at:

    Urgent DCV Updates This Week | cPanel Blog

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice