Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    1

    Default Opening fiiles outside of user directory

    I've just migrated from one Cpanel server to another.

    On my old server, I often used php to require and include files outside of the current domain's user directory. This was handy for calling in database variables from other domains in order to link different databases together.

    However I no longer have permission to do this on my new server. Fopen etc. fails unless the target file is chowned to the UID of the domain trying to access it, which is no good.

    PHP's basedir_protection is definitely not turned on, and neither is PHP safemode. I presumre the ability to open files outside of the current user directory is an apache directive somewhere, but I have no idea where.

    Security worries aside, anyone know how I can fix this? Thanks!

  2. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    I believe this is a security provision of suPHP. You'll either need to adjust the parameters of suPHP, change the PHP handler to a less-security conscious one ( e.g. DSO ) or change the ownership and permissions of the files you are trying to open.
    Kenneth
    Product Manager
    cPanel, Inc.

  3. #3
    Member
    Join Date
    Oct 2006
    Location
    Penang, Malaysia
    Posts
    56

    Default

    Perhaps, you may check for the error_log for more detail and I will not suggest for DSO if you have suPHP turned on.

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Also, be mindful that SuPHP and SuExec is enabled by default on new cPanel/WHM servers. This is a relatively recent change in product defaults.

Similar Threads & Tags
Similar threads

  1. Replies: 2
    Last Post: 12-07-2009, 04:48 PM
  2. Lossing www in URL if opening a directory without a / at the end
    By CoolMike in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-19-2007, 07:02 AM
  3. Replies: 0
    Last Post: 05-03-2007, 11:56 AM
  4. User Deleted Own Directory
    By WestBend in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 09-30-2004, 11:55 AM
  5. User\'s MySQL DB in their directory...
    By ccreighton in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-09-2001, 08:28 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube