PHP upload: Files are assigned to nobody

Published by

Posted on May 11, 2010

PHP uploaded files will generally get uploaded with the user nobody when using mod_php. This is the apache module for PHP which means the file will be uploaded with the apache user. In order to work around this you can modify your code to chown the file to the appropriate ftp user. The best option is to use PHP in FCGI mode or install SuPHP. This will ensure the files will always upload using the folder owner id.

Using cpanel this can be installed using the easyapache tool.