[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apache-php file creation question



Hej Michael,


your PHP-Script runs as www-data, same as your apache does.

Try the following steps:

1. write your output to /var/tmp . Every user is allowed to write there. Check if your php script really puts out.

2. chmod for the target directory. Don't change the perissions for the files but for the directory!

Boris



Michael Martinell wrote:
Hi.

I did ask this question to same apache people and they think it must be the
OS.  So here goes:

I am running debian woody with apache and php.  I have created a php
application that should let me create and edit text files in a particular
directory.  When I try out my program I get a security error from (I think)
debian.

The error when I go to save is as follows:

Warning: fopen(index_blog.html): failed to open stream: Permission denied in
/usr/local/apache/htdocs/blogs/savecreatefile.php on line 38

I have tried changing the permissions on all relevant files to run as
priveleged with 777 just to try to get it to work.  So far I just get the same
error.  Any ideas as to what permissions need to be changed?





Reply to: