Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Sep 2008
    Posts
    19

    Default php creates files with owner 'nobody'

    Greetings,

    Using Joomla, when I create a folder, it has owner=nobody. I presume since php is being invoked to make this folder, it is php assigning 'nobody' as the owner.

    Why would php be doing this?

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

    Root Administrator

    Default

    Quote Originally Posted by guysmiley View Post
    Greetings,

    Using Joomla, when I create a folder, it has owner=nobody. I presume since php is being invoked to make this folder, it is php assigning 'nobody' as the owner.

    Why would php be doing this?
    This is the default behavior of PHP.

    If you prefer that scripts run as the user and files created by these scripts be owned by the user, I recommend running SuPHP (or if you're running PHP as CGI, SuExec).

  3. #3
    Member
    Join Date
    Jan 2005
    Location
    London, UK
    Posts
    187

    Default

    Quote Originally Posted by cPanelDavidG View Post
    I recommend running SuPHP (or if you're running PHP as CGI, SuExec).
    I am running PHP as CGI with SuExec on one server.
    Noticed load shows high now for PHP5.

    - Would SuPHP lower the load?

    - Any 'gotchas' to look out for if I change to SuPHP?

    Many thanks,

    - Vince

  4. #4
    Member
    Join Date
    Jan 2005
    Location
    London, UK
    Posts
    187

    Default

    Quote Originally Posted by mambovince View Post
    I am running PHP as CGI with SuExec on one server.
    Noticed load shows high now for PHP5.

    - Would SuPHP lower the load?

    - Any 'gotchas' to look out for if I change to SuPHP?
    Anyone?
    Also, would you run SuPHP if you're running PHP as CGI or Apache mod, with/without SuExec?

    Many thanks,

    - Vince

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

    Root Administrator

    Default

    Quote Originally Posted by mambovince View Post
    Anyone?
    Also, would you run SuPHP if you're running PHP as CGI or Apache mod, with/without SuExec?

    Many thanks,

    - Vince
    I am unsure about loads, but SuPHP is used when PHP is not running as CGI/FastCGI. When PHP is running as CGI/FastCGI, SuExec is used instead as that targets CGI apps.

    You wont have an instance where a single PHP installation is running under SuExec and SuPHP simultaneously.

  6. #6
    Member
    Join Date
    Jan 2005
    Location
    London, UK
    Posts
    187

    Default

    Thanks David,
    So I cannot run SuPHP on this server then, because it has concurrent PHP4/5 with PHP4 running as Apache MOD?

    Lastly, any 'gotchas' to look out for if I change to SuPHP?
    'm worried about existing client sites that need 777 permissions on some directories.

    Thanks again,

    - Vince

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

    Root Administrator

    Default

    Quote Originally Posted by mambovince View Post
    Thanks David,
    So I cannot run SuPHP on this server then, because it has concurrent PHP4/5 with PHP4 running as Apache MOD?
    I believe you misunderstood my statement. If you run PHP as an Apache module, you can use SuPHP. If you run PHP as any form of CGI, you cannot use SuPHP, and must use SuExec instead as SuExec handles this functionality for CGI applications.

    Quote Originally Posted by mambovince View Post
    Lastly, any 'gotchas' to look out for if I change to SuPHP?
    'm worried about existing client sites that need 777 permissions on some directories.

    Thanks again,

    - Vince
    SuPHP does not permit excessive permissions such as 777 as they are not required in a SuPHP environment. Scripts with 777 permissions or including files with 777 permissions will generate a HTTP 500 error once SuPHP is running.

    Note, any applications that rely on 777 permissions typically mean that whatever user PHP is running as must be able to read, write and execute the file. In a mod_PHP environment, xx7 permissions are required as PHP is running as user nobody. However, when SuPHP is running, you can use 755 permissions or lower without issue since PHP is now running as that individual user.

    Most modern PHP scripts will easily accommodate SuPHP setups. Generally it's only scripts that are unaware of common contemporary PHP security practices that blindly insist on and inappropriately enforce 777 permissions.

  8. #8
    Member
    Join Date
    Jan 2005
    Location
    London, UK
    Posts
    187

    Default

    Thanks for the comprehensive reply, I'm sure it will help others as well as myself.

    Lastly, if I use EasyApache to recompile with SuPHP, does it also check and change all directories and files with 777 and change them to 755?

    If not, is there another script to do this?

    Best wishes,

    - Vince

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

    Root Administrator

    Default

    Here's a related thread that answers that question and may answer additional questions you may think of:

    http://forums.cpanel.net/showthread.php?t=78985

Similar Threads & Tags
Similar threads

  1. Change owner of files
    By micho101 in forum cPanel and WHM Discussions
    Replies: 14
    Last Post: 12-20-2010, 03:51 PM
  2. File Manager No Longer Creates New Files
    By ST1 in forum New User Questions
    Replies: 5
    Last Post: 12-08-2009, 07:46 PM
  3. Can't change files, because owner = 0
    By Scr33x0r in forum New User Questions
    Replies: 3
    Last Post: 01-19-2008, 09:53 AM
  4. files created by script always 'nobody' as owner?
    By jacksony in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-06-2005, 01:16 PM
  5. Wrong owner of FTP files
    By DjMiX in forum New User Questions
    Replies: 1
    Last Post: 11-19-2005, 11:16 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube