Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Apr 2003
    Posts
    555

    Default Uploading files using PHP and ownership

    I have a client who was wondering if there is anyway to change the ownership of a file uploading using PHP to match the main username for the account. I do not want to enable PHP_SUEXEC and was wondering if there was anyway to do this using PHP commands. Is there anyway to chown it with PHP? If not, is there another way around this? Here was what he was wanting to know:

    Files uploaded using http get/php move_uploaded_files take on ownership nobody:nobody.

    It would appear your FTP server daemon masks non-login-owned files - FTP users can't see files uploaded using http get/php move_uploaded_files.

    Can this be fixed so that files owned by nobody:nobody are visible to FTP users?

  2. #2
    Member
    Join Date
    Jan 2004
    Posts
    123

    Default

    Is there any particular reason you don't want phpSuExec? That'd be by far the easiest solution. (and increase the security of your users files from each other considerably)

    Besides that I guess you could look into tweaking the ftpd config to prevent it masking non-user files, but without digging around in the files and knowing which ftpd you're running it's going to be hard to recommend how to do that.

  3. #3
    Member
    Join Date
    Apr 2003
    Posts
    555

    Default

    Do you know what problems occur when enabling phpsuexec? I can't remember what it was but when I tried enabling it a few months back it caused big problems for a couple of clients.

  4. #4
    Member
    Join Date
    Jan 2004
    Posts
    123

    Default

    It stops PHP HTTP auth working, and causes issues if people are currently setting php directives in .htaccess (but they can just whack them in a php.ini instead if they need them, as I recall).

    It can also cause problems with some certain fussy scripts, but I can't remember any off the top off my head that currently have any real issues - most that do relate to either wanting to use php http authentication or .htaccess to pass php directives.

Similar Threads & Tags
Similar threads

  1. Re: Files with nobody ownership
    By esquireme in forum New User Questions
    Replies: 1
    Last Post: 01-03-2011, 06:59 PM
  2. Files with nobody ownership
    By big_bull in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-12-2009, 09:35 PM
  3. PHP Uploading Script blocking files with certain file extensions
    By cummings in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-07-2006, 08:30 PM
  4. Help, hacker uploading files /tmp with external PHP code
    By jeroman8 in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 05-29-2006, 11:50 AM
  5. Uploading Files
    By richardeason in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-29-2004, 07:52 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube