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!

Website cannot access files?

Discussion in 'General Discussion' started by Primacex, Jun 6, 2019.

  1. Primacex

    Primacex Registered

    Joined:
    Jun 6, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Website Owner
    So I've got a website made through GoDaddy and bought cPanel for the file hosting service. I have a feature on the website for a button to play audio when clicked. I uploaded the audio to my cPanel and linked the direct url from the audio file to the website. The feature works but only on my browser, no other computers can access the file. The permissions are set to read and executable and I am not sure how to allow clients to access the file when clicking the button?
     
  2. GOT

    GOT Get Proactive! PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    1,484
    Likes Received:
    187
    Trophy Points:
    193
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    Your code is likely linking to the local file. Taht is why you can play it but others cannot. You need to fix the link on your button to point to where you uploaded it on your site.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Primacex

    Primacex Registered

    Joined:
    Jun 6, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Website Owner
    I have made sure that the link is the file in my cPanel and not local. I can copy and paste the link on a separate device but it requires a login to cPanel to access. The permissions for the file are open to the public so I’m not sure why?
     
  4. GOT

    GOT Get Proactive! PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    1,484
    Likes Received:
    187
    Trophy Points:
    193
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    If you want to PM me the page I'll see if I can see the problem but we cant tell without looking at the code.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    keat63 likes this.
  5. Infopro

    Infopro cPanel Sr. Product Evangelist Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,935
    Likes Received:
    485
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sounds like you've got the file in a password protected directory, or, outside public_html.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Primacex

    Primacex Registered

    Joined:
    Jun 6, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Website Owner
    The website is <removed> and the files are all within public_html.
     
    #6 Primacex, Jun 7, 2019
    Last edited by a moderator: Jun 7, 2019
  7. Infopro

    Infopro cPanel Sr. Product Evangelist Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,935
    Likes Received:
    485
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I've removed your link, no need here. I did look at the source code of your website though, You're linking to files from within cPanel File Manager it seems.

    You should edit the link to be something like this:
    example.com/sounds/thunder.wav
    example.com/sounds/rain.wav

    At the moment, the links are:
    Code:
    https://serverhostname.example.com:2083/cpsess8436549350/frontend/paper_lantern/filemanager/showfile.html?file=Thunder.wav
    https://serverhostname.example.com:2083/cpsess8436549350/frontend/paper_lantern/filemanager/showfile.html?file=Rain.wav
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Primacex

    Primacex Registered

    Joined:
    Jun 6, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Website Owner
    Ah I see. How would I go about changing the links? I've had a look online but nothing stands out. They focus more on changing the general file names within the File Manager.
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,935
    Likes Received:
    485
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    In File Manager, click the index.html (or index.php) and then click Edit at top of page to edit the code of the page itself. Of course, you'll need to know where the actual files are located. If in public_html, then example.com/thunder.wav. If in a directory, example.com/sounds/thunder.wav

    Knowing that file's location in advance, you can simply edit the code of your home page to change the incorrect URL mentioned above.

    GL!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice