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.

easyapache 3 symlink handling undesirable!

Discussion in 'EasyApache' started by jmarcv, Dec 22, 2007.

  1. jmarcv

    jmarcv Member

    Joined:
    Jan 31, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    co
    Well, I finally got apache running with this thing. Sure would be nice if the script warned you it is crashing because it ran out of disk space!

    Which leads to this extremely poor choice of behavior that I am hoping can be configured not to happen!

    As we all know, the default location for htdocs is
    /usr/local/apache/htdocs

    My hosting company keeps /usr on a small partition. Since this is a dedicated server (1 user) I have adopted the habit of using symlinks in the htdocs dir pointing to areas where there is more space.

    Unfortunately, it seems ea removes the symlinks and then copies the actual contents in its place. This is silly! Anyway to stop this? As far as I am concerned, it is a bug. I see no reason for messing with my file system without a warning or confirmation.

    So I am assuming this is an rcopy issue, in that it expands links, and then htdocs is removed and restored.

    I could not fine where rcopy resides (I guess I am not so good with perl)
    Anyone know? Since I figure I will be needing to modify it.
     
  2. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    Is easyapache actually crashing or is the build failing and easyapache stops it and restores the previouse one etc?

    This is not a good idea:
    - symlinks can't always cross filesys boundaries so symlinks in /usr are in /usr and are not saving space
    - /usr should have plenty of space anyway
    - obscure apache/symlink issues

    Actually it currently ignores symlinks:

    next if -l $copy_me;

    Perhaps the apache make install process gets them removed however. /usr/local/apache has to be properly prepared or else apache will not build.

    its not an rcopy() issue. Even it it were, modifying it is a very very very very bad idea:
    - you'd be changing behavior that is assumed
    - there is no good way to ensure that your modifications would not be reverted at any given point.

    I've made a change in the test branch that should address the symlink in htdocs issue. I'm still not convinced its a good idea to support it but it may be harmless.
     
    #2 cPDan, Dec 24, 2007
    Last edited: Dec 24, 2007
  3. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    Had to temporarily re-enable original symlink logic.

    Watch the change log for when symlinks in htdocs are re-preserved.

    thanks!
     
  4. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    htdocs/ symlink functionality restored, thanks!
     
  5. jmarcv

    jmarcv Member

    Joined:
    Jan 31, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    co
    Yes, I see the change has been instituted.

    While I agree that my approach was perhaps incorrect, change on 15 servers will need to be gradual. I do not use symlinks to save space, but rather to have access to my dedicated account through the machine URL as well. Since my ISP partitions /usr to 10-20 Gig, it is a problem backing up the 100 Gig behind the symlinks <g>

    Thanks for the quick fix!
     
  6. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    my pleasure. glad it helped :)
     
Loading...

Share This Page