PHP copy and file ownership

Posted by & filed under Linux.

Came across a taxing problem installing Joomla component on an old 1.05 installation. The error was:

Warning: copy(/home/ [function.copy]: failed to open stream: Permission denied in /home/ucbmedia/public_html/home/administrator/components/com_installer/installer.class.php on line 360

Failed to copy file: /home/ to /home/

The problem was caused by ownership. PHP was running in fast-CGI mode as user ‘nobody’. But the user logged into the was ‘example’.

I logged into the server as root and changed ownership of the the target directory (and the source for good measure), and all was well.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>