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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Symbolic Link and Updates

Discussion in 'General Discussion' started by DHarry, Nov 16, 2016.

  1. DHarry

    DHarry Member

    Joined:
    Nov 9, 2016
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Kansas City, Missouri
    cPanel Access Level:
    Root Administrator
    Hi!

    I'm trying to create a symlink for a directory with images that will be used on several websites. All of the websites will be added as Addon domains.

    I've been messing around and it would seem that symlinks do not stay "current". So, if I add an image to the image directory, the symlink will not reflect the change.

    Also, in my attempts, I'm unable to grab the sub-directories from the image directory.

    Is there a way to keep the symlink updated? And, is there a way to include subdirectories in the symlink as well?

    Thank you in advance for any details or suggestions you may throw my way.
     
  2. DHarry

    DHarry Member

    Joined:
    Nov 9, 2016
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Kansas City, Missouri
    cPanel Access Level:
    Root Administrator
    Quick update! I was able to figure out how to include the sub-directories using the lndir command. However, I still need to figure out how to keep the symlink up to date with my latest images.

    This is the final piece I need help with but I will definitely keep researching and post my findings.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Have you considered configuring the websites to use the direct path to the same images directory? This would allow you to avoid setting up symbolic links, as the Addon domain names are all part of the same cPanel account.

    Thank you.
     
    linux4me2 likes this.
  4. DHarry

    DHarry Member

    Joined:
    Nov 9, 2016
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Kansas City, Missouri
    cPanel Access Level:
    Root Administrator
    I've thought about this but my only problem would be converting the path to a URL. Unfortunately, for the platform I'm using to build these websites, it requires an absolute path/URL for the images.

    I just thought a symbolic link would be best since I can easily generate a URL in this case.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page