The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP upload files with nobody

Discussion in 'General Discussion' started by neo4242002, May 15, 2007.

  1. neo4242002

    neo4242002 Well-Known Member

    Joined:
    Jun 28, 2005
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    In my cPanel server, any files uploaded through php script will belong to nobody:nobady. When cPanel calculating account disk space usage, it ignores these files. So some clients use more disk space then their package allowed. :confused: :confused:

    How to I prevent that?
    How do I tell Apache or PHP to upload files with same user:group name as it in the cpanel account?
    How do I tell cPanel to calculate all files under his account folder when it shows disk space used in cPanel to my clients? (even nobody files and folder)


    Thanks in advance.
     
  2. WebHostDog

    WebHostDog Well-Known Member

    Joined:
    Sep 3, 2006
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Website Owner
    Hello,
    For PHP which runs as mod_php (Apache module) it is the normal way. If you like the PHP to run with user's rights precompile it as CGI (phpsuexec). Easiest way is : /scripts/easyapache
     
  3. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    suphp or phpsuexec (Apache 2 and Apache 1) will allow you to tie uploads to the users account.
     
  4. pipo

    pipo Member

    Joined:
    Nov 4, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Quebec, Canada
    I have this mode enabled in apache and in WHM but the files are owned by nobody..do you have a clue ?
     
  5. jbgama

    jbgama Registered

    Joined:
    Oct 12, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Same problem

    I am with the same problem

    After cpanel update to WHM 11.11.0 cPanel 11.15.0-R17665 and update Apache with Easy Apache.

    After the update Cpanel and apache in the server all files recorded by apache
    how are nobody:nobody

    I upgrade apache again, the option phpsuexec is enabled.

    The option (phpsuexec) only appears at the end of the installation.

    Main >> Service Configuration >> Configure PHP and SuExec

    The configuration is:

    Option Configured Value
    PHP Version 5
    PHP 5 Handler dso
    PHP 4 Handler none
    Suexec on

    I run /scripts/chownpublichtmls

    But the The problem continues.
     
  6. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Suexec is for perl scripts and doesn't apply to php scripts. For those, as ramprage said, you need suphp or phpsuexec (Apache 2 and Apache 1)
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You need to set the PHP handler as suPHP or CGI. The DSO means you are using the Apache module.
     
  8. TheHeartSmasher

    TheHeartSmasher Active Member

    Joined:
    Jul 14, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    You may also have to manually change the user:usergroup permissions for it to work correctly for previous accounts. Any new accounts created should be created and owned by the user:usergroup.
     
Loading...

Share This Page