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!

Permissions on files links not working

Discussion in 'General Discussion' started by Andee, Sep 29, 2018.

  1. Andee

    Andee Registered

    Joined:
    Sep 28, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Canada
    cPanel Access Level:
    Website Owner
    First post – new to cPanel.

    I have a Wordpress site hosted by GoDaddy Linux.

    Within that I have a parent directory with 2 sub directories (a and b). The folders contain information that is private to the current logged in user.

    The security settings at the parent folder are 700 (Owner only)

    I have a PHP script that reads files in subdirectory “a” and shows certain href links to folder “b”. The PHP script can read the files in subdirectory “a” but when a link is clicked it gives a “no page found” error. It works if I set parent folder permissions to 777 (open to the world). However I don’t want these private files visible to anyone else but the current user and not available via a direct URL.

    Is there any way to have an href link to a file that has permissions set to current owner only?
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,124
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Andee

    We're glad to have you here as a part of the community! Is this file the php script reading owned by another user? What PHP handler are you using and what are the permissions of the file currently?

    Thanks!
     
    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