Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    35

    Default PHP safe mode, openbase_dir, and PHP SuExec

    Hi everyone,
    I'm having a small problem here....
    I have PHP safe mode on for my server, and a lot of people require it off...
    I have PHP safe mode on because of the PHP scripts that can view other's files, ect.
    I have heard that the openbase_dir can fix it...
    Also, I have PHP SuExec on for my server, and this has never cause a problem for me.
    I'm just wondering... would it be safe to turn off PHP safe mode, and turn on openbase_dir? Also, does openbase_dir cause any big problems that might get in people's way?
    Thanks,
    Greg

    cPanel.net Support Ticket Number:

  2. #2
    Member rs-freddo's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    836
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    I take it your primary request is how to turn off safe_mode for some sites.

    create a text file called php.ini and place this line in it:
    safe_mode = off
    now upload to the directory where safe mode needs to be off.

    I am assuming that you really are running phpsuexec.

    Don't worry about open_basedir. If you don't want people to see files chmod them r-- --- ---. I think that's 400 (only readable by user) or 700 if it needs write and execute permission as well as read.

    cPanel.net Support Ticket Number:
    Michael

  3. #3
    Member
    Join Date
    Mar 2003
    Posts
    35

    Default

    Can you upload this via FTP, or do you have to do all this via SHH?

    cPanel.net Support Ticket Number:

  4. #4
    Member rs-freddo's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    836
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Originally posted by MscLimp
    Can you upload this via FTP, or do you have to do all this via SHH?

    cPanel.net Support Ticket Number:
    FTP is better as you won't have to chown files.

    cPanel.net Support Ticket Number:
    Michael

  5. #5
    Member
    Join Date
    Mar 2003
    Posts
    35

    Default

    Ok, and this php.ini file can be uploaded into the public_html directory?
    Also, will this make the PHP open_basedir open so that person can view other's files?

    cPanel.net Support Ticket Number:

  6. #6
    Member rs-freddo's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    836
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    If you are using phpsuexec then the open_basedir tweak in WHM doesn't work anyway. Use permissions to stop people viewing others files. This has all been covered extensively in another post.

    cPanel.net Support Ticket Number:
    Michael

  7. #7
    Member
    Join Date
    Mar 2003
    Posts
    35

    Default

    Hi,
    Couple clients try this php.ini thing but it didn't seem to work out...
    Is there anything else you need to do to the file?
    Just put it in the public_html, right?

    cPanel.net Support Ticket Number:

  8. #8
    Member rs-freddo's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    836
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    It doesn't act recursively, you need to put it in the directory the files reside in. If the files are in more than one directory you need to place it in all the directories the files reside in.

    cPanel.net Support Ticket Number:
    Michael

  9. #9
    Member
    Join Date
    Oct 2004
    Posts
    11

    Default

    what a nightmare. it is looking more and more like my customers need to find different software to use instead of one that requires server safe mode off - ya think??

    plus I found this too: http://forums.cpanel.net/showthread....364#post144364
    Last edited by robert2807351; 10-12-2004 at 11:20 AM.

Similar Threads & Tags
Similar threads

  1. Disabling local php.ini while php still runs in SUExec mode
    By gizmoh in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-10-2005, 11:34 AM
  2. PHP Safe Mode
    By summy in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-31-2004, 06:18 AM
  3. PHP Safe Mode
    By LinuxFreaky in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-15-2003, 02:20 PM
  4. PHP Safe Mode
    By IT Hosting in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-04-2002, 07:05 PM
  5. Php Safe Mode
    By Brad in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-19-2001, 04:12 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube