PHP Uploader Fails to Stream
Hello
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
Shows:
web10:x:10010:admispconfig,web10_admin,apache
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
London
|