I want to use FCKeditor to update a file called news.html in the folder called news.
I'm on a Linux box and:
1) I've created a group called newswriters.
2) The groups newswriters does not have a password.
3) I've done: chgrp newswriters news
and: chgrp newswriters news.html
4) The script that writes to the file is called posteddata.php. I've done: chgrp newswriters posteddata.php (I'm not sure if that step is required).
5) Then I've set the group permissions to 7 on news.html and the news folder to make sure the group can write to the file.
6) I've also added the nobody user (under which apache2 runs) to the newswriters group (tho I'm not sure if I needed to do that.)
- Having done all that, I still get a "permission denied error" in the line with the fwrite function call.
- Note: If I change the permissions on the news.html file to 777 then the fwrite call works fine, so it must be a problem with my permissions.
The idea of using a group came from this article:
http://www.onlamp.com/pub/a/php/2003/02 ... tions.html
I may have misunderstood part of the article tho, quote: "A much more reasonable solution is to create directories where PHP will be accessing files and assign it to the same group to which the PHP script belongs."
I hope I got the group part right in step 4.
Tue, 02/14/2006 - 05:40
#1