The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bug Report: easyapache + symlink in apache dir

Discussion in 'EasyApache' started by Synergy8, Mar 31, 2008.

  1. Synergy8

    Synergy8 Member

    Joined:
    Jul 20, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    If you have a symlink in your apache install - eg /usr/local/apache/htdocs

    The symlink is followed during the apache backup process and as such, hundreds of files can be created. This is in the stable version too.

    I was unfortunate enough to have a symlink /usr/local/apache/htdocs/home/ pointing to /home/, and my whole "/home/" partition was copied to /user/local/apache_backup

    Please fix this as it filled up the partition holding /usr/ and subsequently caused further problems.

    The last lines to output before the backup of doom are something like:

    Installing build system files
    Installing man pages and online manual
    mkdir /usr/local/apache/man
    mkdir /usr/local/apache/man/man1
    mkdir /usr/local/apache/man/man8
    mkdir /usr/local/apache/manual
    make[1]: Leaving directory `/home/cpeasyapache/src/httpd-2.2.8'

    Regards,

    Scott
     
  2. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    4
    Trophy Points:
    18
    Hello,

    Actually, this is not a bug, let me explain:

    Before apache's make install htdocs is backed up and removed. This is because if various things exist during apache's make install it can cause the build to fail, or worse appear to succeed but be subtly broken.

    Apache's make install creates htdocs fresh

    The process is documented here:
    http://www.cpanel.net/support/docs/ea/ea3/faq_ea3.html#n7

    > a symlink /usr/local/apache/htdocs/home/ pointing to /home/,

    this is a very dangerous thing to do. htdocs should be just that, apache's standard documentation and a root, fallback website of some sort

    There is no benefit to making it a symlink, only bad things will happen.

    That said, you could have a symlink *inside* htdocs and it should be backed up and restored 'as-is' and then your user's will be accessable via URLs that map to htdocs (since thats the only reason I can think of to want htdocs to be /home). You'd then have to:

    make htdocs/tilde is a symlink to /home:
    use this URI /tilde/user/public_html/
    instead of this URI /user/public_html/

    but then again why not just /~user/ to begin with? Its safe, its standard apache, its the best idea to accomplish what it appears you are trying to do with said dangerous symlink.
     
Loading...

Share This Page