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.

Is there is a problem adding a symbolic link in a users home directory?

Discussion in 'General Discussion' started by DWHS.net, Dec 3, 2003.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    If you wanted to have one directory be viewed by 2 domains, (main and add-on)would it mess with cpanel to have a symbolic link for the second domain to use the directory from the first domain.

    (example)
    The first domain has the folder with the content:

    http://your-main-domain.com/content

    The second has the folder "content" wich uses the content from the main domains folder. The second domain is a add-on.

    http://domain2.com/conent

    Any help would very great on this and if you know the symlink code please post.

    :D Charles
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    No reason why symbolic links can't be used in the public_html directory. For how to use it:
    ln --help
    or for more detail
    man ln
     
  3. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    You may have to add a directive in a .htaccess file.

    Options +FollowSymLinks

    Is what I use on a couple of sites.
     
  4. perlchild

    perlchild Well-Known Member

    Joined:
    Sep 1, 2002
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    I second that, also be careful that the symbolic link you choose points to the same place for a chrooted and non-chrooted environment if the user uses jailshell, that will simplify your life considerably
     
  5. apollo69

    apollo69 Registered

    Joined:
    Jun 28, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I'm a newb, so pls bear with me. :)

    I need to do something similar to this. Lets say I have two domains, each with sub-directories ABC and XYZ. I want anyone looking up anything in directory ABC to see the contents of directory XYZ.

    However, the ln command as described in the man page seems to imply that symlinks are created between files, so the format:

    will create symlinks within ABC to each TARGET file in XYZ. But if at a later time additional files are created in XYZ, there won't be corresponding symlinks in directory ABC.

    Is there a solution to actually link directories so directory ABC actually navigates to XYZ?

    Help!
     
    #5 apollo69, May 12, 2004
    Last edited: May 12, 2004
Loading...

Share This Page