Skip to main content

Prevent cgi-bin directory from being automatically created when connecting via sFTP

Comments

6 comments

  • cPanelMichael
    Hello :) Thank you for providing that workaround. We appreciate the input.
    0
  • kevinquinnyo
    I think this section is added by cPanel, based on where it is in the /etc/bashrc. So I'm assuming it will be recreated when cPanel updates? cPanel what's the reasoning behind forcing the creation of this directory each time a bash session is spawned?
    0
  • cPanelMichael
    I have not seen any reports of cPanel overwriting the changes made to /etc/bashrc other than during the initial installation. Thank you.
    0
  • kevinquinnyo
    Thanks cPanelMichael. It makes sense that a cPanel update would not overwrite /etc/bashrc, and that's a great policy. However, I wonder why is it there in the first place? The initial cPanel installation *seems* to add this to /etc/bashrc (I might be wrong on that). But if so, perhaps it's a legacy thing that should be removed on the next release? I just don't see a reason for automatic, forceful creation of $HOME/public_html/cgi_bin on every login. It even does it for root (because it's in the global bashrc). Why would I ever want a /root/public_html/cgi_bin/ nonetheless, a /root/public_html/ ? It's not a critical issue, but I'm just passing it along in case it needs to be suggested to the devs (maybe you're a part of that team?) . It really seems like a bug at this point. Thanks again for the followup
    0
  • ITGabs
    Good tip! I saw an issue about some empty domains, probably it is related to the creation of public_html from a cpanel login when public_html it's empty or with the default content. what I see is the change of the group of the folder public_html for user:user when in the creation it is user:nobody note that I am using fcgid_mod but after there is some content that never happen again, another thing is about the user is under root, no reseller just the default. clean empty cgi-bin folders find /home/ -name cgi-bin -type d -empty -exec rmdir {} \;
    check the no empty ones find /home/ -name cgi-bin -exec echo {} \;
    this will work for .svn and .cvs folders... take care with rm commands!
    0
  • cPanelMichael
    [quote="kevinquinnyo, post: 1590711">I just don't see a reason for automatic, forceful creation of $HOME/public_html/cgi_bin on every login. It even does it for root (because it's in the global bashrc). Why would I ever want a /root/public_html/cgi_bin/ nonetheless, a /root/public_html/ ?
    This would be a good idea for a feature request: Submit A Feature Request Thank you.
    0

Please sign in to leave a comment.