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.

Referencing images from another cPanel account

Discussion in 'General Discussion' started by JU5TY, Nov 14, 2011.

  1. JU5TY

    JU5TY Member

    Joined:
    Nov 11, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    I have a central CMS, within that I have an images folder which holds all the uploaded images for all my websites.

    What is the best way to reference these images from different websites/cPanel accounts, when I was on shared hosting I just referenced a sub domain images.cmswebsite.com.

    Is there a better way to do this via cPanel now everything is on the same server? IE virtual directory etc?

    I did hear that cPanel is designed to keep all users separate and you are likely to get permissions problems if you are trying to access files owned by one user as a different user?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Yes, if you are using suPHP rather than DSO where files are owned by the group of the user (which is the user itself), then you cannot reference paths to other accounts. You will need to continue using a subdomain for this functionality and using the absolute url.

    The only other option would be to put the images into /usr/local/cpanel/img-sys location and call them from there. I just tried that and it does work:

    http://endar.org/

    All I did was the following:

    1. Put an image SW.jpg into /usr/local/cpanel/img-sys location

    2. Put the following code into /home/endar/public_html/index.html page

    Code:
    <img src="/img-sys/SW.jpg" />
    This appears to work to allow you to share images between accounts from what I can see.
     
  3. JU5TY

    JU5TY Member

    Joined:
    Nov 11, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for your help Tristan, I will look into the method you've suggested.
     
Loading...

Share This Page