View Single Post
Old 26th March 2009, 20:47
AdrianSmithUK AdrianSmithUK is offline
Junior Member
Join Date: Mar 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default PHP Uploader Fails to Stream


About a month ago projektfarm kindly setup ispConfig v2.7 on my CentOS5.2 server. (Which was well worth the money!!!)

I am now working on a project where I need to use PHP scripts to:

1. Create / Delete temporary .csv files using PHP commands.
2. Upload .csv files to the server

With the default ownership settings (web10_admin:web10) I currently get an error when I try creating/ deleting/ uploading files.
Warning: copy(/home/www/web10/web/test/uploadsdigreadout11.jpg) [function.copy]: failed to open stream: Permission denied in /home/www/web10/web/test/uploads/uploader.php on line 6
Could not copy file

I have found a partial solution by changing the ownerships as follows:

# chown -R -v -f apache:apache /home/www/web10/web/

However, with the ownerships set to apache I can't administer the files via ftp. I get another error message saying that I don’t have permission.

I guessed that I could add apache to the web10 group and that this would fix things. So I changed all of the files back to (web10_admin:web10) ownerships and added apache to the web10 group:

# usermod -a -G apache,web10 apache

#vi etc/group



However, the upload script still fails to stream. Same error as shown previously.

All of the files and directories were chmod'ed to 775.

Does anybody know the solution?

Kind Regards,

Adrian Smith
Reply With Quote
Sponsored Links